[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1204241010270.1511-100000@iolanthe.rowland.org>
Date: Tue, 24 Apr 2012 10:14:05 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Wang YanQing <udknight@...il.com>
cc: Anil Nair <anilcoll90@...il.com>, Greg KH <greg@...ah.com>,
lkml <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: Re: [RFC]Is usb port number fixed?
On Tue, 24 Apr 2012, Wang YanQing wrote:
> On Mon, Apr 23, 2012 at 11:13:06AM -0400, Alan Stern wrote:
> > The port numbers are determined by the hardware -- each set of wires
> > has its own port number. The numbers have nothing to do with
> > bandwidth.
> Could you figure out the codes in kernel that read out the port number from
> hub, if there is a piece of codes do that things?
In drivers/usb/core/hub.c, look through the hub_events() routine.
There are several function calls similar to this one:
ret = hub_port_status(hub, i,
&portstatus, &portchange);
Here i is the port number. This asks the hub to send back status and
change information for port i. (See also the code for the
hub_port_status() and get_port_status() routines.)
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists