diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-03-23 15:05:28 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-03-23 15:21:35 +0000 |
commit | de6f4e3ede895b45325c5d062d25a94d1dd37e2e (patch) | |
tree | 220b52023811b1c21c8c59855027e2f43a200a6f /src/include | |
parent | 661189eedef6d895a0b3b2c793cbdfba731bdc7d (diff) | |
download | ipxe-de6f4e3ede895b45325c5d062d25a94d1dd37e2e.tar.gz |
[usb] Reset endpoints without waiting for a new transfer to be enqueued
The current endpoint reset logic defers the reset until the caller
attempts to enqueue a new transfer to that endpoint. This is
insufficient when dealing with endpoints behind a transaction
translator, since the transaction translator is a resource shared
between multiple endpoints.
We cannot reset the endpoint as part of the completion handling, since
that would introduce recursive calls to usb_poll(). Instead, we
add the endpoint to a list of halted endpoints, and perform the reset
on the next call to usb_step().
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ipxe/usb.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/include/ipxe/usb.h b/src/include/ipxe/usb.h index a9c185f6..5b95c20c 100644 --- a/src/include/ipxe/usb.h +++ b/src/include/ipxe/usb.h @@ -380,11 +380,12 @@ struct usb_endpoint { /** Endpoint is open */ int open; - /** Current failure state (if any) */ - int rc; /** Buffer fill level */ unsigned int fill; + /** List of halted endpoints */ + struct list_head halted; + /** Host controller operations */ struct usb_endpoint_host_operations *host; /** Host controller private data */ @@ -754,7 +755,7 @@ struct usb_port { */ struct usb_device *usb; /** List of changed ports */ - struct list_head list; + struct list_head changed; }; /** A USB hub */ @@ -888,6 +889,8 @@ struct usb_bus { struct list_head hubs; /** List of changed ports */ struct list_head changed; + /** List of halted endpoints */ + struct list_head halted; /** Process */ struct process process; |