tech-kern archive

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

RE: USB port numbering



Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:

> > That part of your change is puerly cosmetic, 
>
> The idea was to be consistent everywhere we loop on ports. 

For what it's worth, the USB spec (especially 3.x) uses origin-1 port
numbers. This is true from USB 1.0 in the hub commands, but starting with
USB 3.0 traffic is addressed to devices using "routing strings": sequences
of port-numbers; since there are a variable number of levels in the tree
(based on how many hubs there are in the path), a zero means "end of
string". These are used by hardware in that form. So it is probably good to
use origin-1 for port numbers everywhere.  Using origin-0 in some places and
origin-1 in others is a maintenance problem. I think you're right to want
consistency.

Best regards
--Terry




Home | Main Index | Thread Index | Old Index