Fix USB initialization.
After USB RESET, all endpoints registers are being reset. So, there is no need to let each endpoint stall (it's disabled). Actually, it's wrong to call usb_lld_stall_rx or usb_lld_stall_tx before usb_lld_setup_endpoint, because other fields of endpoint register are not specified after RESET.
This commit is contained in:
@@ -1579,10 +1579,6 @@ usb_event_handle (struct usb_dev *dev)
|
||||
/* Transfer to endpoint (not control endpoint) */
|
||||
if (ep_num != 0)
|
||||
{
|
||||
/* Ignore sprious "Correct Transfer" */
|
||||
if (bDeviceState != USB_DEVICE_STATE_CONFIGURED)
|
||||
return 0;
|
||||
|
||||
if (USB_EVENT_TXRX (e))
|
||||
usb_tx_done (ep_num, USB_EVENT_LEN (e));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user