aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index c2448950a8d..2b025200a69 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -902,7 +902,7 @@ static irqreturn_t s3c2410_udc_irq(int dummy, void *_dev)
902 int pwr_reg; 902 int pwr_reg;
903 int ep0csr; 903 int ep0csr;
904 int i; 904 int i;
905 u32 idx; 905 u32 idx, idx2;
906 unsigned long flags; 906 unsigned long flags;
907 907
908 spin_lock_irqsave(&dev->lock, flags); 908 spin_lock_irqsave(&dev->lock, flags);
@@ -1017,6 +1017,20 @@ static irqreturn_t s3c2410_udc_irq(int dummy, void *_dev)
1017 } 1017 }
1018 } 1018 }
1019 1019
1020 /* what else causes this interrupt? a receive! who is it? */
1021 if (!usb_status && !usbd_status && !pwr_reg && !ep0csr) {
1022 for (i = 1; i < S3C2410_ENDPOINTS; i++) {
1023 idx2 = udc_read(S3C2410_UDC_INDEX_REG);
1024 udc_write(i, S3C2410_UDC_INDEX_REG);
1025
1026 if (udc_read(S3C2410_UDC_OUT_CSR1_REG) & 0x1)
1027 s3c2410_udc_handle_ep(&dev->ep[i]);
1028
1029 /* restore index */
1030 udc_write(idx2, S3C2410_UDC_INDEX_REG);
1031 }
1032 }
1033
1020 dprintk(DEBUG_VERBOSE, "irq: %d s3c2410_udc_done.\n", IRQ_USBD); 1034 dprintk(DEBUG_VERBOSE, "irq: %d s3c2410_udc_done.\n", IRQ_USBD);
1021 1035
1022 /* Restore old index */ 1036 /* Restore old index */