Dave already answered some of these questions.  Here are my views:

On Sun, 1 Jul 2007, jidong xiao wrote:

> about device descriptor,according to usb spec 2.0,
> 1. A hub returns different descriptors based on whether it is
> operating at high speed or full/low speed.A hub can report three
> different sets of the descriptors.
> 2. A hub must operate at high-speed when its upstream facing port is
> connected at high-speed.The hub must operate at full speed when its
> upstream facing port is connected at full-speed.
> 
> Take root hub for example, how does the hub itself know whether its
> upstream facing port is connected at high-speed or
> full-speed?

Like Dave said, this notion makes no sense for root hubs since they 
don't have upstream ports.

>  Futhermore, if a host send a GET_DESCRIPTOR request to a
> hub,how does it know which set of descriptor should be reported?

In Linux, the root hub returns a descriptor suitable for high speed if 
the controller supports high-speed operation (i.e., if it is an EHCI 
controller).  Otherwise it returns a descriptor suitable for full 
speed.

> Let's see following section of code,sampled from hub_configure(),we
> need to judge bDeviceProtocol of the device descriptor, it can be
> 0,1,or 2, but it's the value reported by hub,how does the hub know
> which one should be reported when it received GET_DESCRIPTOR from the
> host.
> 
>     570         switch (hdev->descriptor.bDeviceProtocol) {
>     571                 case 0:
>     572                         break;
>     573                 case 1:
>     574                         dev_dbg(hub_dev, "Single TT\n");
>     575                         hub->tt.hub = hdev;
>     576                         break;
>     577                 case 2:
>     578                         ret = usb_set_interface(hdev, 0, 1);
>     579                         if (ret == 0) {
>     580                                 dev_dbg(hub_dev, "TT per port\n");
>     581                                 hub->tt.multi = 1;
>     582                         } else
>     583                                 dev_err(hub_dev, "Using single
> TT (err %d)\n",
>     584                                         ret);
>     ...

If the root hub doesn't operate at high speed then it returns 0.  If 
the root hub supports high speed then it returns 1.  See 
rh_call_control() in drivers/usb/core/hcd.c.

As far as I know, there are no root hubs with more than one TT.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to