Commit 8ca9f3ab authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[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.
parent fda616fe
...@@ -161,16 +161,18 @@ static void qtd_copy_status ( ...@@ -161,16 +161,18 @@ static void qtd_copy_status (
usb_endpoint_halt (urb->dev, usb_endpoint_halt (urb->dev,
usb_pipeendpoint (pipe), usb_pipeendpoint (pipe),
usb_pipeout (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 #ifdef DEBUG
struct usb_device *tt = urb->dev->tt->hub; struct usb_device *tt = urb->dev->tt->hub;
dbg ("clear tt %s-%s p%d buffer, a%d ep%d", dev_dbg (&tt->dev,
tt->bus->bus_name, tt->devpath, "clear tt buffer port %d, a%d ep%d t%08x\n",
urb->dev->ttport, urb->dev->devnum, urb->dev->ttport, urb->dev->devnum,
usb_pipeendpoint (pipe)); usb_pipeendpoint (urb->pipe), token);
#endif /* DEBUG */ #endif /* DEBUG */
usb_hub_tt_clear_buffer (urb->dev, pipe); usb_hub_tt_clear_buffer (urb->dev, urb->pipe);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment