Skip to content

Commit

Permalink
usb: gadget: composite: Write SuperSpeedPlus config descriptors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Youn authored and Felipe Balbi committed Mar 4, 2016
1 parent f3bdbe3 commit eae5820
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit eae5820

Please sign in to comment.