diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2017-12-19 14:28:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 18:15:20 +0300 |
commit | 7c0143153cd33a0a267908ca419e2adc40ee513a (patch) | |
tree | 31f9c96eb6e770593486ead641214c66777031f8 /include/uapi/linux/usb | |
parent | e142dc1ecc555c77826ee2706dd86f329d35597e (diff) | |
download | linux-7c0143153cd33a0a267908ca419e2adc40ee513a.tar.xz |
USB: clarify USB_DT_USB_SSP_CAP_SIZE(ssac) definition
USB_DT_USB_SSP_CAP_SIZE(ssac) gives the size of the SSP capability
descriptor. The descriptor consists of 12 bytes plus a array of
SSA entries.
The number of SSA entries is stored in a SSAC value in the first 12 bytes,
The USB3.1 specification 9.6.2.5 defines SSAC as zero based:
"The number of Sublink Speed Attributes = SSAC + 1." This is not
intuitive and has already caused some confusion.
Make a small modifiaction to the USB_DT_USB_SSP_CAP_SIZE(ssac)
definition to make it a bit clearer
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/usb')
-rw-r--r-- | include/uapi/linux/usb/ch9.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index c4c79aa331bd..d5a5caec8fbc 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h @@ -1077,9 +1077,9 @@ struct usb_ptm_cap_descriptor { #define USB_DT_USB_PTM_ID_SIZE 3 /* * The size of the descriptor for the Sublink Speed Attribute Count - * (SSAC) specified in bmAttributes[4:0]. + * (SSAC) specified in bmAttributes[4:0]. SSAC is zero-based */ -#define USB_DT_USB_SSP_CAP_SIZE(ssac) (16 + ssac * 4) +#define USB_DT_USB_SSP_CAP_SIZE(ssac) (12 + (ssac + 1) * 4) /*-------------------------------------------------------------------------*/ |