mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-20 02:40:08 +00:00
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:
parent
93a2bac94b
commit
4550458806
@ -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
@ -1 +1 @@
|
||||
Subproject commit 32d0b8200d2d6eadc00ddfb1e1c2113e148d325a
|
||||
Subproject commit f781ac9e6a09d4bf160a21c96a6f1ce96fdacb36
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user