Re: [PATCH] usb: optimize set_bulk_out_req_length() in mass storage gadgets

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

 



hi,

On Wed, Oct 05, 2011 at 12:00:16AM +0300, Felipe Balbi wrote:
> On Tue, Oct 04, 2011 at 12:31:56PM -0700, Paul Zimmerman wrote:
> > > On Tue, Oct 04, 2011 at 10:44:36AM -0700, Paul Zimmerman wrote:
> > > > > From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx]
> > > > > Sent: Tuesday, October 04, 2011 6:57 AM
> > > > >
> > > > > On Mon, 3 Oct 2011, Paul Zimmerman wrote:
> > > > >
> > > > > > Since bulk max packet size must always be a power of 2, we can
> > > > > > use the 'and' operator instead of modulus.
> > > > >
> > > > > Just a quick observation: AFAIK, in wireless USB the bulk maxpacket
> > > > > size does not have to be a power of 2.  On the other hand, if it isn't
> > > > > then it's not clear that the mass-storage gadgets would work.
> > > >
> > > > Drat, I forgot about WUSB and it's dreaded non-power-of-2 max packet
> > > > sizes.
> > > >
> > > > I guess it's better not to apply the patch then, it's probably only
> > > > a tiny optimization on any halfway modern CPU.
> > > 
> > > that would mean that for dwc3, we would need to use a chained transfer
> > > for the remaining bytes, right ? Meaning that we would need a 1024bytes
> > > throw-away buffer for that, correct ?
> > > 
> > > I'll start playing with that tomorrow and see how that could be done...
> > > I guess I could get that finished by v3.3
> > 
> > Hi Felipe,
> > 
> > Not sure what you are referring to here? dwc3 is not wireless USB, so
> > it will be fine with or without this patch. The patch was only a small
> > optimization, nothing more.
> 
> I mean what if we try to read 1536 bytes and we're running at
> SuperSpeed? Wasn't the purpose of original patch to align req->length to
> wMaxPacketSize ?

hmm, apparently I confused both patches, nevermind ;-)

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux