diff options
author | Michael Brown <mcb30@ipxe.org> | 2020-10-12 15:21:25 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2020-10-12 15:21:25 +0100 |
commit | ebf01660810c4ff923754323049d49d37321fd49 (patch) | |
tree | a86a91d751ccee4e0d5c01d8581abfcb98f6aae5 /src/include/ipxe/usb.h | |
parent | c70b3e04e86cefca335e36f883829d89583a6921 (diff) | |
download | ipxe-ebf01660810c4ff923754323049d49d37321fd49.zip ipxe-ebf01660810c4ff923754323049d49d37321fd49.tar.gz ipxe-ebf01660810c4ff923754323049d49d37321fd49.tar.bz2 |
[usb] Allow device halt to be cleared independently of host controller
Closing and reopening a USB endpoint will clear any halt status
recorded by the host controller, but may leave the endpoint halted at
the device. This will cause the first packet submitted to the
reopened endpoint to be lost, before the automatic stall recovery
mechanism detects the halt and resets the endpoint.
This is relatively harmless for USB network or HID devices, since the
wire protocols will recover gracefully from dropped packets. Some
protocols (e.g. for USB mass storage devices) assume zero packet loss
and so would be adversely affected.
Fix by allowing any device endpoint halt status to be cleared on a
freshly opened endpoint.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/usb.h')
-rw-r--r-- | src/include/ipxe/usb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ipxe/usb.h b/src/include/ipxe/usb.h index 68289d2..a05ac61 100644 --- a/src/include/ipxe/usb.h +++ b/src/include/ipxe/usb.h @@ -580,6 +580,7 @@ usb_endpoint_described ( struct usb_endpoint *ep, struct usb_interface_descriptor *interface, unsigned int type, unsigned int index ); extern int usb_endpoint_open ( struct usb_endpoint *ep ); +extern int usb_endpoint_clear_halt ( struct usb_endpoint *ep ); extern void usb_endpoint_close ( struct usb_endpoint *ep ); extern int usb_message ( struct usb_endpoint *ep, unsigned int request, unsigned int value, unsigned int index, |