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:
NIIBE Yutaka
2018-04-26 21:08:30 +09:00
parent 93a2bac94b
commit 4550458806
4 changed files with 2 additions and 10 deletions

View File

@@ -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