The isr is going to check for a status phase on the indexed endpoint.
Input endpoints have no status bits and can be skipped for that test.

Signed-off-by: Michael Grzeschik <m.grzesc...@pengutronix.de>
---
This patch is based on the change mentioned by Matthieu CASTET,
but moves the check before using hw_test_and_clear_setup_status.

 drivers/usb/chipidea/udc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 69d20fb..9364184 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -989,6 +989,7 @@ __acquires(ci->lock)
                }
 
                if (hwep->type != USB_ENDPOINT_XFER_CONTROL ||
+                   (i >= ci->hw_ep_max / 2) ||
                    !hw_test_and_clear_setup_status(ci, i))
                        continue;
 
-- 
1.8.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to