Re: [RFC]Is usb port number fixed?

From: Alan Stern
Date: Mon Apr 23 2012 - 11:13:07 EST

On Mon, 23 Apr 2012, Wang YanQing wrote:

> On Sun, Apr 22, 2012 at 08:47:24AM -0400, Alan Stern wrote:
> > On Sun, 22 Apr 2012, Anil Nair wrote:
> >
> > > The port number comes from root hub managed by the host controller. Its
> > > fixed dynamically during enumeration, and can change.
> > > Please correct me if i am wrong.
> >
> > You are indeed wrong. Port numbers are not fixed dynamically and they
> > cannot change.
> Right?


> Could you pin out the codes in kernel?

I don't understand the question. What code in the kernel do you want
to see?

> > On the other hand, bus numbers _are_ assigned dynamically and they can
> > (and do) change.
> >
> Indeed, I never meat the situation lspci output different bus number on the same machine.
> Any more comment?

Try unloading ehci-hcd, uhci-hcd, and ohci-hcd, and then reloading them
in different orders. Depending on what sort of hardware you have, the
bus numbers will change.

On Mon, 23 Apr 2012, Anil Nair wrote:

> You meant to say port numbers are fixed but bus address changes
> dynamically, also does the host controller
> fixes the port number?


> If USB Bus bandwidth is not available, how does it
> assign port numbers?

The port numbers are determined by the hardware -- each set of wires
has its own port number. The numbers have nothing to do with

Alan Stern

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at