On Sun, 23 Jun 2013, Ming Lei wrote:

> >> Since you mentioned it doesn't make sense to generate short packet
> >> in the middle of transfer, also it may not be what the driver/device 
> >> expected,
> >> I suggest to add a check in usb_submit_urb() for this case and returns
> >> failure on it simply, because all HCDs shouldn't support this sort of 
> >> thing.
> >> The check in usb_submit_urb() can avoid unnecessary change in HCD.
> >>
> >> Any comments on the idea?
> >
> > Wireless USB has some strange features, one of which is that the
> > maxpacket sizes for endpoints can be changed.  I'm afraid that adding
> > this check in usb_submit_urb() would not work right for wireless USB.
> > See
> >
> >         http://marc.info/?l=linux-usb&m=136934531624850&w=2
> 
> From the Thomas's last reply in the discussion, looks the device's maxp
> need to be set as one value which is divided evenly into 4k, so looks the
> check might be OK for wireless USB too.

Maybe.  Thomas should be able to tell us.

> > That's why, if the check is checked, I feel it should be added to each
> > HCD driver separately.  Maybe I'm wrong.  But before doing anything,
> > you should check with Thomas Pugliese.  He recently added SG support to
> > the wireless USB driver.
> 
> Suppose wireless USB is one exception, it should the only one, so we can
> rule it out easily by using hcd->wireless, right?

Yes, that's true.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to