Re: [PATCH V2] usb: gadget: f_mass_storage: fix req->length for reset request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Jan 2011, Mankad, Maulik Ojas wrote:

> On Thu, Jan 13, 2011 at 6:18 PM, Maulik Mankad <maulik@xxxxxx> wrote:
> > When USB CV MSC tests are run on f_mass_storage gadget
> > Bulk Only Mass Storage Reset fails since req->length
> > is set to USB_BUFSIZ=1024 in composite_setup().
> >
> > Set req->length to zero since the reset request does not
> > contain any data transfers.
> >
> > Signed-off-by: Maulik Mankad <maulik@xxxxxx>
> > Cc: Michal Nazarewicz <mina86@xxxxxxxxxx>
> > Cc: Felipe Balbi <balbi@xxxxxx>
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
> > ---
> > Update Michal's email address.
> > Rebased to Linus's master.
> >
> >  drivers/usb/gadget/f_mass_storage.c |    1 +
> >  1 file changed, 1 insertion(+)
> >
> > Index: mainline/drivers/usb/gadget/f_mass_storage.c
> > ===================================================================
> > --- mainline.orig/drivers/usb/gadget/f_mass_storage.c
> > +++ mainline/drivers/usb/gadget/f_mass_storage.c
> > @@ -626,6 +626,7 @@ static int fsg_setup(struct usb_function
> >                 * and reinitialize our state.
> >                 */
> >                DBG(fsg, "bulk reset request\n");
> > +               fsg->common->ep0req->length = 0;
> >                raise_exception(fsg->common, FSG_STATE_RESET);
> >                return DELAYED_STATUS;
> >
> 
> Alan, David,
> 
> Any comments on this one?

This really should be handled by Michal.  But AFAICS the fix is not 
correct.  The whole DELAYED_STATUS definition and interpretation needs 
to be put into the composite core.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux