From: make shi Date: Fri, 12 Oct 2012 09:01:33 +0000 (+0800) Subject: ENGR00229354 Mx6 USB device: fix wrong handle for invalid USB_FEATURE requests X-Git-Tag: v3.0.35-fsl~374 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eae7224a64080074f31312a70fec36774fc061c7;p=karo-tx-linux.git ENGR00229354 Mx6 USB device: fix wrong handle for invalid USB_FEATURE requests 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 --- diff --git a/drivers/usb/gadget/arcotg_udc.c b/drivers/usb/gadget/arcotg_udc.c index 75fe978a8e01..484e62e79ba9 100755 --- a/drivers/usb/gadget/arcotg_udc.c +++ b/drivers/usb/gadget/arcotg_udc.c @@ -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