]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00229354 Mx6 USB device: fix wrong handle for invalid USB_FEATURE requests
authormake shi <b15407@freescale.com>
Fri, 12 Oct 2012 09:01:33 +0000 (17:01 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:32 +0000 (08:35 +0200)
There is a bug udc driver handle invalid USB_FEATURE requests in current bsp.
The invalid USB_FEATURE request will be handled as a valid USB_FEATURE request.
We should set protocol stall on ep0 to handle invalid USB_FEATURE requests.

Signed-off-by: make shi <b15407@freescale.com>
drivers/usb/gadget/arcotg_udc.c

index 75fe978a8e01be8ae63e6b874559e607c9e589f4..484e62e79ba94657ddff07868b2dcd2c3145c6f6 100755 (executable)
@@ -1695,6 +1695,10 @@ static void setup_received_irq(struct fsl_udc *udc,
                                else if (setup->bRequest ==
                                         USB_DEVICE_A_ALT_HNP_SUPPORT)
                                        udc->gadget.a_alt_hnp_support = 1;
+                               else
+                                       break;
+                       } else {
+                               break;
                        }
                        rc = 0;
                } else