Re: [RFT 2/2] USB: Free bandwidth when usb_disable_device is called.

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

 



On Tue, 7 Jun 2011, Sarah Sharp wrote:

> > > Also, what about USB 3.0 devices, where multiple max packets can be
> > > burst at one time?  The devices that set bMaxBurst are required to set
> > > the max packet size to a fixed value.  I think USB 3.0 isochronous
> > > devices can do bursts, but I would have to check.
> > 
> > Yes, bursting might complicate the issue.  Still, drivers should be 
> > able to tell the scheduling code how much of the potential bandwidth 
> > they actually intend to use.
> 
> Yes, and the endpoints that benefit most from bursting (bulk endpoints)
> won't count against the bus bandwidth.  The transfers will just be fit
> in as necessary.

For SuperSpeed periodic endpoints, the wBytePerInterval field in the 
endpoint companion descriptor could be adjusted.  However I'm not aware 
of any bandwidth-limited SuperSpeed applications that could benefit 
from this...

The most interesting case is high-speed high-bandwidth isochronous
endpoints (i.e., bits 11-12 are set in the wMaxPacketSize field).  The
bus protocol requires that each packet except the last have size equal
to the maxpacket value.  This means that all you could do is reduce the
multiplicity count, which is a rather awkward restriction -- changing
bits 0-10 would break multi-transaction transfers.

The facility could have some limited use for non-high-bandwidth 
isochronous endpoints (which includes all full-speed endpoints).

> > > I'm more interested in making sure that the drivers that use a different
> > > polling interval than advertised in the endpoint descriptors are able to
> > > change the xHCI interval.
> > 
> > Why would a driver want to use a different interval?  Generally 
> > speaking, with isochronous transfers you _can't_ reasonably change the 
> > interval.  With interrupt transfers you can, but the only effect is to 
> > decrease latency -- why wouldn't the latency in the descriptor be 
> > adequate?

It turns out that this isn't quite right either.  5.6.4 in the USB-2.0 
spec says: "However, an isochronous endpoint must be prepared to
handle poll rates faster than the one specified."  So it is valid to 
use periods smaller than the descriptor says (although again, I can't 
think of any occasions where you would want to).  On the other hand, 
it's not valid to use periods that are longer.

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