summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_host.c
diff options
context:
space:
mode:
authorCliff Cai <cliff.cai@analog.com>2010-01-28 20:44:18 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:48 -0800
commit9f445cb29918dc488b7a9a92ef018599cce33df7 (patch)
tree912365e85cc2b0f75dfc20a011c9d7e2db195362 /drivers/usb/musb/musb_host.c
parent0ded2f146acfaf71e5f4c15b80cf89b3af48134c (diff)
downloadtalos-obmc-linux-9f445cb29918dc488b7a9a92ef018599cce33df7.tar.gz
talos-obmc-linux-9f445cb29918dc488b7a9a92ef018599cce33df7.zip
USB: musb: disable double buffering for older RTL versions
Trying to use double buffer modes in RTL versions <2.0 may result in infinite hangs or data corruption. So avoid them with older versions. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_host.c')
-rw-r--r--drivers/usb/musb/musb_host.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index c3fdd6d69f5e..3421cf9858b5 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -605,8 +605,14 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
musb_writeb(ep->regs, MUSB_RXTYPE, qh->type_reg);
musb_writeb(ep->regs, MUSB_RXINTERVAL, qh->intv_reg);
/* NOTE: bulk combining rewrites high bits of maxpacket */
- musb_writew(ep->regs, MUSB_RXMAXP,
- qh->maxpacket | ((qh->hb_mult - 1) << 11));
+ /* Set RXMAXP with the FIFO size of the endpoint
+ * to disable double buffer mode.
+ */
+ if (musb->hwvers < MUSB_HWVERS_2000)
+ musb_writew(ep->regs, MUSB_RXMAXP, ep->max_packet_sz_rx);
+ else
+ musb_writew(ep->regs, MUSB_RXMAXP,
+ qh->maxpacket | ((qh->hb_mult - 1) << 11));
ep->rx_reinit = 0;
}
OpenPOWER on IntegriCloud