aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/amd5536udc.c56
1 files changed, 25 insertions, 31 deletions
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index 77352ccc245e..d5b65962dd36 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -2378,40 +2378,34 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix)
2378 if (!ep->cancel_transfer && !list_empty(&ep->queue)) { 2378 if (!ep->cancel_transfer && !list_empty(&ep->queue)) {
2379 req = list_entry(ep->queue.next, 2379 req = list_entry(ep->queue.next,
2380 struct udc_request, queue); 2380 struct udc_request, queue);
2381 if (req) { 2381 /*
2382 /* 2382 * length bytes transfered
2383 * length bytes transfered 2383 * check dma done of last desc. in PPBDU mode
2384 * check dma done of last desc. in PPBDU mode 2384 */
2385 */ 2385 if (use_dma_ppb_du) {
2386 if (use_dma_ppb_du) { 2386 td = udc_get_last_dma_desc(req);
2387 td = udc_get_last_dma_desc(req); 2387 if (td) {
2388 if (td) { 2388 dma_done =
2389 dma_done = 2389 AMD_GETBITS(td->status,
2390 AMD_GETBITS(td->status, 2390 UDC_DMA_IN_STS_BS);
2391 UDC_DMA_IN_STS_BS); 2391 /* don't care DMA done */
2392 /* don't care DMA done */
2393 req->req.actual =
2394 req->req.length;
2395 }
2396 } else {
2397 /* assume all bytes transferred */
2398 req->req.actual = req->req.length; 2392 req->req.actual = req->req.length;
2399 } 2393 }
2394 } else {
2395 /* assume all bytes transferred */
2396 req->req.actual = req->req.length;
2397 }
2400 2398
2401 if (req->req.actual == req->req.length) { 2399 if (req->req.actual == req->req.length) {
2402 /* complete req */ 2400 /* complete req */
2403 complete_req(ep, req, 0); 2401 complete_req(ep, req, 0);
2404 req->dma_going = 0; 2402 req->dma_going = 0;
2405 /* further request available ? */ 2403 /* further request available ? */
2406 if (list_empty(&ep->queue)) { 2404 if (list_empty(&ep->queue)) {
2407 /* disable interrupt */ 2405 /* disable interrupt */
2408 tmp = readl( 2406 tmp = readl(&dev->regs->ep_irqmsk);
2409 &dev->regs->ep_irqmsk); 2407 tmp |= AMD_BIT(ep->num);
2410 tmp |= AMD_BIT(ep->num); 2408 writel(tmp, &dev->regs->ep_irqmsk);
2411 writel(tmp,
2412 &dev->regs->ep_irqmsk);
2413 }
2414
2415 } 2409 }
2416 } 2410 }
2417 } 2411 }