On Wednesday 04 February 2009, Sergei Shtylyov wrote: > For some strange reason musb_giveback() decides that it's always IN transfer > in case the hardware endpoint has shared FIFO. This causes musb_save_toggle() > to read the toggle state from the RXCSR register instead of TXCSR; it also may > cause unneeded reloading of the Rx endpoint registers. > > Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> Appropriate for 2.6.29-rc ... trashing the toggle is badness. One reason this bug has stayed around for a long time is that the shared FIFO configuration has primarily been used for periodic IN endpoints. > > --- > The patch is against the recent Linus' kernel. > > drivers/usb/musb/musb_host.c | 7 +------ > 1 files changed, 1 insertion(+), 6 deletions(-) > > Index: linux-2.6/drivers/usb/musb/musb_host.c > =================================================================== > --- linux-2.6.orig/drivers/usb/musb/musb_host.c > +++ linux-2.6/drivers/usb/musb/musb_host.c > @@ -335,16 +335,11 @@ musb_save_toggle(struct musb_hw_ep *ep, > static struct musb_qh * > musb_giveback(struct musb_qh *qh, struct urb *urb, int status) > { > - int is_in; > struct musb_hw_ep *ep = qh->hw_ep; > struct musb *musb = ep->musb; > + int is_in = usb_pipein(urb->pipe); > int ready = qh->is_ready; > > - if (ep->is_shared_fifo) > - is_in = 1; > - else > - is_in = usb_pipein(urb->pipe); > - > /* save toggle eagerly, for paranoia */ > switch (qh->type) { > case USB_ENDPOINT_XFER_BULK: > > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html