usb: store the new usb 3.1 SuperSpeedPlus device capability descriptor
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 1 Oct 2015 15:40:33 +0000 (18:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 09:34:17 +0000 (10:34 +0100)
If a device supports usb 3.1 SupeerSpeedPlus Gen2 speeds it povides
a SuperSpeedPlus device capability descriptor as a part of its
BOS descriptor. If we find one while parsing the BOS then save it
togeter with the other device capabilities found in the BOS

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/config.c
include/linux/usb.h

index b9ddf0c1ffe5993893d5bd0d4f3ffe3f313ed435..7caff020106e23f26f9c3bb9c34585885064848d 100644 (file)
@@ -853,6 +853,10 @@ int usb_get_bos_descriptor(struct usb_device *dev)
                        dev->bos->ss_cap =
                                (struct usb_ss_cap_descriptor *)buffer;
                        break;
+               case USB_SSP_CAP_TYPE:
+                       dev->bos->ssp_cap =
+                               (struct usb_ssp_cap_descriptor *)buffer;
+                       break;
                case CONTAINER_ID_TYPE:
                        dev->bos->ss_id =
                                (struct usb_ss_container_id_descriptor *)buffer;
index 2cbcf8db517a38bfd13d2063a69dc98a17ff548e..b9a28074210f218e05383099b8c043d4ca9fff93 100644 (file)
@@ -328,6 +328,7 @@ struct usb_host_bos {
        /* wireless cap descriptor is handled by wusb */
        struct usb_ext_cap_descriptor   *ext_cap;
        struct usb_ss_cap_descriptor    *ss_cap;
+       struct usb_ssp_cap_descriptor   *ssp_cap;
        struct usb_ss_container_id_descriptor   *ss_id;
 };