From 57d6b3cc9a9da5480c4627146b89805b7342a32d Mon Sep 17 00:00:00 2001 From: supriya karanth Date: Fri, 4 Jan 2013 17:10:33 +0530 Subject: [PATCH] --- yaml --- r: 354593 b: refs/heads/master c: a70b84421be5eebde59b0c9e15d20f316e1fbea9 h: refs/heads/master i: 354591: 4e118d18d22704baf557a0450f5d8cb266738e4a v: v3 --- [refs] | 2 +- trunk/drivers/usb/musb/musb_host.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 4ad33b79cc5d..18a0abd1b3e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8df4ce75189807783c4bb4e4337e0f89283e6ca3 +refs/heads/master: a70b84421be5eebde59b0c9e15d20f316e1fbea9 diff --git a/trunk/drivers/usb/musb/musb_host.c b/trunk/drivers/usb/musb/musb_host.c index cf3705fd78c8..1ce1fcf3f3e7 100644 --- a/trunk/drivers/usb/musb/musb_host.c +++ b/trunk/drivers/usb/musb/musb_host.c @@ -756,7 +756,13 @@ static void musb_ep_program(struct musb *musb, u8 epnum, /* general endpoint setup */ if (epnum) { /* flush all old state, set default */ - musb_h_tx_flush_fifo(hw_ep); + /* + * We could be flushing valid + * packets in double buffering + * case + */ + if (!hw_ep->tx_double_buffered) + musb_h_tx_flush_fifo(hw_ep); /* * We must not clear the DMAMODE bit before or in @@ -773,11 +779,13 @@ static void musb_ep_program(struct musb *musb, u8 epnum, ); csr |= MUSB_TXCSR_MODE; - if (usb_gettoggle(urb->dev, qh->epnum, 1)) - csr |= MUSB_TXCSR_H_WR_DATATOGGLE - | MUSB_TXCSR_H_DATATOGGLE; - else - csr |= MUSB_TXCSR_CLRDATATOG; + if (!hw_ep->tx_double_buffered) { + if (usb_gettoggle(urb->dev, qh->epnum, 1)) + csr |= MUSB_TXCSR_H_WR_DATATOGGLE + | MUSB_TXCSR_H_DATATOGGLE; + else + csr |= MUSB_TXCSR_CLRDATATOG; + } musb_writew(epio, MUSB_TXCSR, csr); /* REVISIT may need to clear FLUSHFIFO ... */