Re: Values for SetHubDepth and GetPortErrorCount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 07, 2015 at 12:49:39PM +0300, Tal Shorer wrote:
> In include/linux/usb/hcd.h, we have
> 
> /* class requests from USB 3.0 hub spec, table 10-5 */
> #define SetHubDepth (0x3000 | HUB_SET_DEPTH)
> #define GetPortErrorCount (0x8000 | HUB_GET_PORT_ERR_COUNT)
> 
> However, from the usb 3.1 spec I downloaded at
> http://www.usb.org/developers/docs/,
> table 10-5 appears to be unrelated (Table 10-5. Enhanced SuperSpeed
> Hub Descriptor).

Um, look at the comment you copied "3.0 hub spec", vs. the spec you
downloaded and referred to "3.1 spec".  Things might have changed :)

> Table 10-7 (Table 10-7. Hub Class Requests) lists the two values as:
> Request bmRequestType bRequest wValue wIndex wLength Data
> SetHubDepth 00100000B SET_HUB_DEPTH Hub Depth Zero Zero None
> GetPortErrorCount 10100011B GET_PORT_ERR_COUNT Zero Port Two Number of
> Link Errors on this port
> 
> It appears the correct bmRequestType values should be:
> #define SetHubDepth (0x2000 | HUB_SET_DEPTH)
> #define GetPortErrorCount (0xa300 | HUB_GET_PORT_ERR_COUNT)
> 
> Which are the bmRequestType values of SetHubFeature and GetPortStatus
> (and friends).
> 
> These lines were introduced in
> commit 0eadcc09203349b11ca477ec367079b23d32ab91
> Author: Tatyana Brokhman <tlinder@xxxxxxxxxxxxxx>
> Date:   Mon Nov 1 18:18:24 2010 +0200
> 
>     usb: USB3.0 ch11 definitions
> 
>     Adding hub SuperSpeed usb definitions as defined by ch10 of the USB3.0
>     spec.
> 
>     Signed-off-by: Tatyana Brokhman <tlinder@xxxxxxxxxxxxxx>
>     Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
> 
> The values are only used by dummy_hcd which does nothing with them and
> by max3421-hcd which returns an error.
> Can anyone clarify what I'm missing or if the values are actually wrong?

Can you compare the 3.1 to the 3.0 spec and see if they changed things
here?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux