Re: [PATCH] usb: fix mass storage gadgets to work with Synopsys UDC

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

 



On Fri, 30 Sep 2011, Felipe Balbi wrote:

> Hi,
> 
> On Fri, Sep 30, 2011 at 10:24:20PM +0300, Felipe Balbi wrote:
> > This is actually a good point. We can't simply roundup request length on
> > UDC driver because we don't know if gadget driver has allocated enough
> > space should host send more data.
> > 
> > OTOH, if we don't roundup request->lenght, driver won't work *always* on
> > SuperSpeed.
> > 
> > From DWC3 point this patch should be acceptable, but there could be
> > another controller with a different quirk where DMA wouldn't complete
> > unless we pass correct size, dunno.
> > 
> > Alan ?

I don't have any particular objection beyond the fact that Paul's patch
isn't complete (compare it to the one I just posted).  As for other
controller quirks, that's a little more complex.  If we ever do
encounter hardware that doesn't work when the actual packet size is
smaller than the requested size, we'd have to take some pretty drastic
action to support it.  A quirk like that is liable to affect every
gadget driver.  Somehow the gadget drivers would have to tell the
controller driver whether or not it's permissible to fail a transfer
merely because the packet size was smaller than expected.  If not, the
transfer would have to use PIO rather than DMA.

> I just remembered, though, that MSC has no short packets, that's why we
> set short_not_ok flag. So, is this really necessary ? I'll run some
> extra tests on monday.

Remember, Paul wasn't talking about short packets -- he was talking 
about packets that aren't a multiple of the maxpacket value.  It's not 
the same thing.

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