RE: [PATCH] usb: gadget: storage: check for valid USB_BULK_GET_MAX_LUN_REQUEST

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

 



On Sat, 15 Oct 2011, Alan Stern wrote:

> On Fri, 14 Oct 2011, Paul Zimmerman wrote:
> 
> > Attached are the log from the CV tester (v 0.9.13.1) and a screenshot from
> > the USB analyzer. The failing test sequence starts at packet #1367853.
> > Notice that the error message in the log does not match what actually
> > happened on the bus.
> 
> Here is the failing test message:
> 
>   Issuing Get Max LUN request with incorrect Length parameter (>1)
>   Invalid response from Get Max LUN request, expected 1 byte of data to be returned but received at least 10 bytes
> 
> The analyzer screenshot shows that the device did send back only one
> byte of data.  So this appears to be a bug in the CV program itself,
> not a violation of any sort.  In fact, the error message indicates that 
> the mass-storage gadgets' current behavior is correct.  (But maybe the 
> CV program prints out the wrong error message -- this would still be a 
> bug, of course.)

I just took a look at the USB20CV documentation (release 1.4.7.0).  It
says that receiving a single byte from Get Max LUN with wLength > 1 is
a valid response.

On the other hand, it also says that the class-specific Reset request 
must have wLength = 0, and this requirement is more logical.  We 
currently do not check for this; adding such a check would be a 
reasonable thing to do.

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