We are running the musb driver on a AM335 cpu paired with a microchip hub 
(USB2412).

In one of our use-cases, we have a high chance of having an error on a bulk 
split transaction. Since the musb driver does not implement the clear TT buffer 
it leaves us with a TT buffer full on the hub which in turns NAK any new split 
transactions.

To fix this problem, we added the Clear_TT_Buffer handling in case of a split 
transaction error, trying to match the spec as closely as possible.

We came up with the following:

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 26bda88..ac1a959 100755
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -376,6 +376,11 @@ static void musb_advance_schedule(struct musb *musb, 
struct urb *urb,
                break;
        }
 
+       if ((status || urb->unlinked) &&
+           (usb_pipecontrol(urb->pipe) || usb_pipebulk(urb->pipe)) &&
+           urb->dev->tt)
+               usb_hub_clear_tt_buffer(urb);
+
        qh->is_ready = 0;
        musb_giveback(musb, urb, status);
        qh->is_ready = ready;

This seems to work in our case but we'd like to get feedback in order to 
improve the patch if needed.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to