* Neil Zhang | 2011-09-19 16:23:36 [+0800]: >diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c >index 29e1515..e77bee6 100644 >--- a/drivers/usb/gadget/mv_udc_core.c >+++ b/drivers/usb/gadget/mv_udc_core.c > >+#define TEST_DISABLE 0 >+ >+static void mv_udc_testmode(struct mv_udc *udc, u16 index) >+{ >+ if (index <= TEST_FORCE_EN) { >+ udc->test_mode = index; >+ if (udc_prime_status(udc, EP_DIR_IN, 0, true)) >+ ep0_stall(udc); >+ >+ if (index == TEST_DISABLE) >+ mv_set_ptc(udc, TEST_DISABLE); >+ } else >+ dev_err(&udc->dev->dev, >+ "This test mode(%d) is not supported\n", index); >+} >+ > static void ch9setaddress(struct mv_udc *udc, struct usb_ctrlrequest *setup) > { > udc->dev_addr = (u8)setup->wValue; >@@ -1471,8 +1513,8 @@ static void ch9clearfeature(struct mv_udc *udc, struct usb_ctrlrequest *setup) > udc->remote_wakeup = 0; > break; > case USB_DEVICE_TEST_MODE: >- mv_udc_testmode(udc, 0, false); >- break; >+ mv_udc_testmode(udc, TEST_DISABLE); Interresting. My understanding is that the only way to disable a testmode is by a usb reset issued by the Host. That means that clear feature should now work. Does it work? Also I miss the clear of the testmode in usb bus reset (unless it has been done already). Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html