Browse Source

usb: s3c-hsotg: Avoid TxFIFO corruption in DMA mode

Writing to TxFIFO relates only to Slave mode and leads to
TxFIFO corruption in DMA mode.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Anton Tikhomirov 13 years ago
parent
commit
70fa030ffb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/usb/gadget/s3c-hsotg.c

+ 2 - 1
drivers/usb/gadget/s3c-hsotg.c

@@ -1921,7 +1921,8 @@ static void s3c_hsotg_epint(struct s3c_hsotg *hsotg, unsigned int idx,
 		    ints & S3C_DIEPMSK_TxFIFOEmpty) {
 			dev_dbg(hsotg->dev, "%s: ep%d: TxFIFOEmpty\n",
 				__func__, idx);
-			s3c_hsotg_trytx(hsotg, hs_ep);
+			if (!using_dma(hsotg))
+				s3c_hsotg_trytx(hsotg, hs_ep);
 		}
 	}
 }