ChangeSet 1.1595.7.18, 2003/07/30 13:33:37-07:00, david-b@pacbell.net [PATCH] USB: ehci-hcd, TT fixup I noticed that some cases where USB produced lots of TT messages were clearly wrong, since the transactions completed cleanly (with a stall) and the TT buffer cleanup is only supposed to be needed when a CSPLIT transaction fails (for control or bulk). This patch makes the TT buffer cleanup happen only in the rarer cases where there was an error that might really need it. drivers/usb/host/ehci-q.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c --- a/drivers/usb/host/ehci-q.c Fri Aug 1 10:54:55 2003 +++ b/drivers/usb/host/ehci-q.c Fri Aug 1 10:54:55 2003 @@ -161,16 +161,18 @@ usb_endpoint_halt (urb->dev, usb_pipeendpoint (pipe), usb_pipeout (pipe)); - if (urb->dev->tt && !usb_pipeint (pipe)) { + + /* if async CSPLIT failed, try cleaning out the TT buffer */ + } else if (urb->dev->tt && !usb_pipeint (urb->pipe) + && QTD_CERR(token) == 0) { #ifdef DEBUG - struct usb_device *tt = urb->dev->tt->hub; - dbg ("clear tt %s-%s p%d buffer, a%d ep%d", - tt->bus->bus_name, tt->devpath, - urb->dev->ttport, urb->dev->devnum, - usb_pipeendpoint (pipe)); + struct usb_device *tt = urb->dev->tt->hub; + dev_dbg (&tt->dev, + "clear tt buffer port %d, a%d ep%d t%08x\n", + urb->dev->ttport, urb->dev->devnum, + usb_pipeendpoint (urb->pipe), token); #endif /* DEBUG */ - usb_hub_tt_clear_buffer (urb->dev, pipe); - } + usb_hub_tt_clear_buffer (urb->dev, urb->pipe); } } }