diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-06-29 10:43:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-12 15:16:38 -0700 |
commit | cb88a1b887bb8908f6e00ce29e893ea52b074940 (patch) | |
tree | 198cba7974836d994cfc839b95242e8321702d5c /drivers/usb/core/hub.h | |
parent | 87ea8c887905d8b13ae90b537117592ed027632a (diff) | |
download | kernel_goldelico_gta04-cb88a1b887bb8908f6e00ce29e893ea52b074940.zip kernel_goldelico_gta04-cb88a1b887bb8908f6e00ce29e893ea52b074940.tar.gz kernel_goldelico_gta04-cb88a1b887bb8908f6e00ce29e893ea52b074940.tar.bz2 |
USB: fix the clear_tt_buffer interface
This patch (as1255) updates the interface for calling
usb_hub_clear_tt_buffer(). Even the name of the function is changed!
When an async URB (i.e., Control or Bulk) going through a high-speed
hub to a non-high-speed device is cancelled or fails, the hub's
Transaction Translator buffer may be left busy still trying to
complete the transaction. The buffer has to be cleared; that's what
usb_hub_clear_tt_buffer() does.
It isn't safe to send any more URBs to the same endpoint until the TT
buffer is fully clear. Therefore the HCD needs to be told when the
Clear-TT-Buffer request has finished. This patch adds a callback
method to struct hc_driver for that purpose, and makes the hub driver
invoke the callback at the proper time.
The patch also changes a couple of names; "hub_tt_kevent" and
"tt.kevent" now look rather antiquated.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hub.h')
-rw-r--r-- | drivers/usb/core/hub.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 889c0f3..de8081f 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -188,16 +188,18 @@ struct usb_tt { /* for control/bulk error recovery (CLEAR_TT_BUFFER) */ spinlock_t lock; struct list_head clear_list; /* of usb_tt_clear */ - struct work_struct kevent; + struct work_struct clear_work; }; struct usb_tt_clear { struct list_head clear_list; unsigned tt; u16 devinfo; + struct usb_hcd *hcd; + struct usb_host_endpoint *ep; }; -extern void usb_hub_tt_clear_buffer(struct usb_device *dev, int pipe); +extern int usb_hub_clear_tt_buffer(struct urb *urb); extern void usb_ep0_reinit(struct usb_device *); #endif /* __LINUX_HUB_H */ |