Re: patch "usb: usb_storage: do not align length of request for CBW to maxp size" added to usb tree

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

 



On Wed, 13 Apr 2011 gregkh@xxxxxxx wrote:

> This is a note to let you know that I've just added the patch titled
> 
>     usb: usb_storage: do not align length of request for CBW to maxp size
> 
> to my usb git tree which can be found at
>     git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6.git
> in the usb-next branch.
> 
> The patch will show up in the next release of the linux-next tree
> (usually sometime within the next 24 hours during the week.)
> 
> The patch will also will be merged in the next major kernel release
> during the merge window.
> 
> If you have any questions about this process, please let me know.
> 
> 
> From 806e8f8fcc27e1753947bd9f059ba2316cf8f92a Mon Sep 17 00:00:00 2001
> From: Mian Yousaf Kaukab <mian.yousaf.kaukab@xxxxxxxxxxxxxx>
> Date: Thu, 24 Mar 2011 12:20:13 +0100
> Subject: usb: usb_storage: do not align length of request for CBW to maxp size
> 
> Mass-storage and file-storage gadgets align the length to maximum-packet-size
> when preparing the request to receive CBW. This is unnecessary and prevents the
> controller driver from knowing that a short-packet is expected.
> 
> It is incorrect to set short_not_ok when preparing the request to receive CBW.
> CBW will be a short-packet so short_not_ok must not be set.
> 
> This makes bh->bulk_out_intended_length unnecessary so it is also removed.

The necessity for this patch has been under discussion.

It turns out the UDC that Mian has been working on and Felipe's UDC
have contradictory requirements.  Mian's UDC driver wants a bulk-OUT
transfer length to be shorter than the maxpacket size if a short packet
is expected, whereas Felipe's UDC hardware always needs bulk-OUT
transfer lengths to be evenly divisible by the maxpacket size.

Mian has agreed to go back over the driver to resolve this conflict.  
This means we probably will not want this patch after all.  (In fact,
we may ultimately decide to change the gadget framework to require that
bulk-OUT transfer lengths _always_ be divisible by the maxpacket size
-- only the g_file_storage and g_mass_storage gadgets would need to be
changed.)

Mian, should Greg revert this patch now?  I think we will want to 
revert it eventually...

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