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:
@@ -1,6 +1,6 @@
|
||||
2018-04-26 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/usb-ccid.c (usb_event_handle): Ignore sprious "done".
|
||||
* src/usb_ctrl.c (usb_device_reset): Don't stop the endpoints.
|
||||
|
||||
* src/configure (MHZ, def_mhz): New.
|
||||
|
||||
|
||||
2
chopstx
2
chopstx
Submodule chopstx updated: 32d0b8200d...f781ac9e6a
@@ -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
|
||||
|
||||
@@ -214,10 +214,6 @@ usb_device_reset (struct usb_dev *dev)
|
||||
64);
|
||||
#endif
|
||||
|
||||
/* Stop the interface */
|
||||
for (i = 0; i < NUM_INTERFACES; i++)
|
||||
gnuk_setup_endpoints_for_interface (dev, i, 1);
|
||||
|
||||
bDeviceState = USB_DEVICE_STATE_DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user