diff options
author | Darius Augulis <augulis.darius@gmail.com> | 2009-01-21 08:18:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:20:28 -0400 |
commit | d24921a36df31332c32e1bb539671284d9e36bfa (patch) | |
tree | c983e57a9ed5c257d58d3bfe33d81ccf8e1780cf /drivers/usb/gadget/imx_udc.c | |
parent | 593bef6c75e11d2edb5396bd9775cf49a4cda659 (diff) |
USB: imx_udc: Fix IMX UDC gadget ep0 irq handling
Fix ep0 interrupt handling in IMX UDC Gadget.
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/imx_udc.c')
-rw-r--r-- | drivers/usb/gadget/imx_udc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 3ee5bd8bea70..e590464c3a50 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -1133,6 +1133,7 @@ end_irq: | |||
1133 | static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev) | 1133 | static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev) |
1134 | { | 1134 | { |
1135 | struct imx_udc_struct *imx_usb = dev; | 1135 | struct imx_udc_struct *imx_usb = dev; |
1136 | struct imx_ep_struct *imx_ep = &imx_usb->imx_ep[0]; | ||
1136 | int intr = __raw_readl(imx_usb->base + USB_EP_INTR(0)); | 1137 | int intr = __raw_readl(imx_usb->base + USB_EP_INTR(0)); |
1137 | 1138 | ||
1138 | dump_ep_intr(__func__, 0, intr, imx_usb->dev); | 1139 | dump_ep_intr(__func__, 0, intr, imx_usb->dev); |
@@ -1142,16 +1143,15 @@ static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev) | |||
1142 | return IRQ_HANDLED; | 1143 | return IRQ_HANDLED; |
1143 | } | 1144 | } |
1144 | 1145 | ||
1145 | /* DEVREQ IRQ has highest priority */ | 1146 | /* DEVREQ has highest priority */ |
1146 | if (intr & (EPINTR_DEVREQ | EPINTR_MDEVREQ)) | 1147 | if (intr & (EPINTR_DEVREQ | EPINTR_MDEVREQ)) |
1147 | handle_ep0_devreq(imx_usb); | 1148 | handle_ep0_devreq(imx_usb); |
1148 | /* Seem i.MX is missing EOF interrupt sometimes. | 1149 | /* Seem i.MX is missing EOF interrupt sometimes. |
1149 | * Therefore we monitor both EOF and FIFO_EMPTY interrups | 1150 | * Therefore we don't monitor EOF. |
1150 | * when transmiting, and both EOF and FIFO_FULL when | 1151 | * We call handle_ep0() only if a request is queued for ep0. |
1151 | * receiving data. | ||
1152 | */ | 1152 | */ |
1153 | else if (intr & (EPINTR_EOF | EPINTR_FIFO_EMPTY | EPINTR_FIFO_FULL)) | 1153 | else if (!list_empty(&imx_ep->queue)) |
1154 | handle_ep0(&imx_usb->imx_ep[0]); | 1154 | handle_ep0(imx_ep); |
1155 | 1155 | ||
1156 | __raw_writel(intr, imx_usb->base + USB_EP_INTR(0)); | 1156 | __raw_writel(intr, imx_usb->base + USB_EP_INTR(0)); |
1157 | 1157 | ||