diff options
author | John Youn <John.Youn@synopsys.com> | 2016-02-06 02:07:17 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 14:14:25 +0100 |
commit | eae5820b852f2b434fc7734b5b1226bcc4ae9b92 (patch) | |
tree | 0b442250d3f541d79eb761d880043a509f842dc5 /drivers/usb/gadget | |
parent | usb: gadget: composite: Add function to get descriptors (diff) | |
download | linux-eae5820b852f2b434fc7734b5b1226bcc4ae9b92.tar.xz linux-eae5820b852f2b434fc7734b5b1226bcc4ae9b92.zip |
usb: gadget: composite: Write SuperSpeedPlus config descriptors
Enable writing of SuperSpeedPlus descriptors for any SuperSpeedPlus
capable configuration when connected in SuperSpeedPlus.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/composite.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 1d4f324e4bac..b938fcfee235 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -473,7 +473,7 @@ static int config_desc(struct usb_composite_dev *cdev, unsigned w_value) u8 type = w_value >> 8; enum usb_device_speed speed = USB_SPEED_UNKNOWN; - if (gadget->speed == USB_SPEED_SUPER) + if (gadget->speed >= USB_SPEED_SUPER) speed = gadget->speed; else if (gadget_is_dualspeed(gadget)) { int hs = 0; @@ -504,6 +504,10 @@ static int config_desc(struct usb_composite_dev *cdev, unsigned w_value) check_config: /* ignore configs that won't work at this speed */ switch (speed) { + case USB_SPEED_SUPER_PLUS: + if (!c->superspeed_plus) + continue; + break; case USB_SPEED_SUPER: if (!c->superspeed) continue; |