From: anil <anilcoll90@gmail.com>
To: Wang YanQing <udknight@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>, Greg KH <greg@kroah.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-usb@vger.kernel.org
Subject: Re: [RFC]Is usb port number fixed?
Date: Tue, 24 Apr 2012 19:52:44 +0530 [thread overview]
Message-ID: <1335277364.2094.13.camel@anil-desktop> (raw)
In-Reply-To: <20120424021600.GA5283@udknight>
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
--
next prev parent reply other threads:[~2012-04-24 14:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHkwNT=DTjdhZmEg+SFGOVi+ZcS-NpHWH8Hh3XV+-BPzHRC7NA@mail.gmail.com>
2012-04-22 12:47 ` [RFC]Is usb port number fixed? Alan Stern
2012-04-23 1:52 ` Wang YanQing
2012-04-23 15:13 ` Alan Stern
2012-04-24 2:16 ` Wang YanQing
2012-04-24 14:14 ` Alan Stern
2012-04-24 15:58 ` Wang YanQing
2012-04-24 14:22 ` anil [this message]
2012-04-24 2:24 ` Wang YanQing
2012-04-20 9:25 Wang YanQing
2012-04-20 9:37 ` Wang YanQing
2012-04-20 15:37 ` Greg KH
[not found] ` <CAHkwNT=VW8qF-7QRxpiaWkmQm0UFdsbahFLhT-PCc4OMnVs1Gg@mail.gmail.com>
2012-04-20 16:19 ` Greg KH
2012-04-21 0:32 ` Alan Stern
2012-04-21 5:56 ` Wang YanQing
2012-04-21 17:23 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335277364.2094.13.camel@anil-desktop \
--to=anilcoll90@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=udknight@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox