USB: fix the clear_tt_buffer interface
commitd34b435e14c18f29e15660e6fa2121297fb50018
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 29 Jun 2009 14:43:32 +0000 (29 10:43 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:34:00 +0000 (8 20:34 -0700)
tree67ad0cbd8cfeee9b1b1b52f99e635d542d87a48f
parent3970742fce3383231a240f5bcd018c7f7106f5ea
USB: fix the clear_tt_buffer interface

commit cb88a1b887bb8908f6e00ce29e893ea52b074940 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.h
drivers/usb/core/hub.c
drivers/usb/core/hub.h
drivers/usb/host/ehci-q.c