On Fri, 1 Nov 2013, Pratyush Anand wrote: > Tested-by: Pratyush Anand <pratyush.anand@xxxxxx> Thank you. > However, I noticed that the same error recovery test fails even after > above patch if dwc3 dbg/vdbg messages are enabled. However, reason is > not in dwc3 driver, rather in mass storage driver. > > Any specific reason for returning DELAYED_STATUS and not USB_GADGET_DELAYED_STATUS > while handling bulk reset request.? It seems a bug to me in mass > storage driver. Yes, it is a bug. > Test passes with dwc3 debug messages enabled if following patch is > used. > > diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c > index 1b443e3..915024b 100644 > --- a/drivers/usb/gadget/f_mass_storage.c > +++ b/drivers/usb/gadget/f_mass_storage.c > @@ -634,7 +634,7 @@ static int fsg_setup(struct usb_function *f, > */ > DBG(fsg, "bulk reset request\n"); > raise_exception(fsg->common, FSG_STATE_RESET); > - return DELAYED_STATUS; > + return USB_GADGET_DELAYED_STATUS; > > case USB_BULK_GET_MAX_LUN_REQUEST: > if (ctrl->bRequestType != Now DELAYED_STATUS isn't used anywhere. You should add the following hunk to this patch: Index: usb-3.12/drivers/usb/gadget/storage_common.c =================================================================== --- usb-3.12.orig/drivers/usb/gadget/storage_common.c +++ usb-3.12/drivers/usb/gadget/storage_common.c @@ -156,7 +156,6 @@ static inline struct fsg_lun *fsg_lun_fr /* Big enough to hold our biggest descriptor */ #define EP0_BUFSIZE 256 -#define DELAYED_STATUS (EP0_BUFSIZE + 999) /* An impossibly large value */ #ifdef CONFIG_USB_GADGET_DEBUG_FILES Alan Stern -- 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