lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1335277364.2094.13.camel@anil-desktop>
Date:	Tue, 24 Apr 2012 19:52:44 +0530
From:	anil <anilcoll90@...il.com>
To:	Wang YanQing <udknight@...il.com>
Cc:	Alan Stern <stern@...land.harvard.edu>, 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, 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
detail.
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?

Regards
Anil Nair
--


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ