[lkml]   [2012]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC]Is usb port number fixed?
On Tue, 2012-04-24 at 10:16 +0800, 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?

The USB specification Table 11-13 describes the hub descriptor in
The following data structure struct usb_hub_descriptor defined in
"drivers/usb/core/hub.h" of Linux Kernel source contains information
about the hub descriptor,

struct usb_hub_descriptor {
_u8 bDescLength;
_u8 bDescriptorType;
_u8 bNbrPorts;
_le16 wHubCharacteristics;
_u8 bPwrOn2PwrGood;
_u8 bHubContrCurrent;

The bNbrPorts member contains information on the number of
downstream-facing ports the hub supports. The structure which i have
provided is in reference to Linux Kernel Version 2.6 series for Linux
Kernel Version 3.0+, Please consult an expert.
Is this information you wanted?

Anil Nair

 \ /
  Last update: 2012-04-24 16:25    [W:0.049 / U:27.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site