Re: Walking the USB tree?

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

 



On Fri, 1 Jul 2011, Sarah Sharp wrote:

> On Fri, Jul 01, 2011 at 02:16:43PM -0400, Alan Stern wrote:
> > On Fri, 1 Jul 2011, Sarah Sharp wrote:
> > 
> > > > For one thing, we need to store along with the TT a record of how much 
> > > > time has been committed in each frame.  If a hub has per-port TTs, we 
> > > > need this information for each port.
> > > 
> > > I'm not sure xHCI can make use of that information, since it's just
> > > blindly reserving the max bandwidth for each TT with active FS/LS
> > > periodic endpoints.
> > 
> > You'll probably tell me to go read the code...  but what happens if the 
> > user plugs a second device into a TT that already has some active 
> > periodic endpoints?  Since the full bandwidth of the TT is already 
> > reserved, the periodic endpoints of the second device wouldn't be 
> > accessible.
> 
> The full bandwidth of the full speed bus (12Mbps) is reserved on the HS
> bus.  Then we calculate, for each TT, what the worst case frame would be
> for it.  So when a LS or FS device is plugged in, we have to recalculate
> the bandwidth that's free for both the HS bus (which is only effected if
> this is the first periodic endpoint added to this TT), and then the bus
> bandwidth for that TT.  The newly added device would be taken care of by
> the TT bandwidth calculation in your example.

That's what I'm talking about.  Instead of recalculating the free 
bandwidth for the LS/FS part of the bus, we should store it along with 
the TT.  For xhci-hcd this would be a time-space tradeoff.

However for ehci-hcd this is really necessary.  The existing
implementation doesn't keep track of how much bandwidth has actually
been allocated; instead it relies on looking at how much is currently
in use.  This is wrong, because the bandwidth can remain allocated for
some period of time even while it isn't being used.

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