summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorJohn Youn2016-02-06 02:06:49 +0100
committerFelipe Balbi2016-03-04 14:14:24 +0100
commita4afd012f400b5b41e2db2b0bf7e384f738411ae (patch)
tree8228e733e2696783866a448a8dcaee196e7f7d64 /drivers/usb/gadget/composite.c
parentusb: gadget: Update config for SuperSpeedPlus (diff)
downloadkernel-qcow2-linux-a4afd012f400b5b41e2db2b0bf7e384f738411ae.tar.gz
kernel-qcow2-linux-a4afd012f400b5b41e2db2b0bf7e384f738411ae.tar.xz
kernel-qcow2-linux-a4afd012f400b5b41e2db2b0bf7e384f738411ae.zip
usb: gadget: composite: Count configs for SuperSpeedPlus
If enumerated in SuperSpeedPlus, count the configurations that support it. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 560330f5457c..44ad7aa6f8f1 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -511,18 +511,24 @@ static int count_configs(struct usb_composite_dev *cdev, unsigned type)
unsigned count = 0;
int hs = 0;
int ss = 0;
+ int ssp = 0;
if (gadget_is_dualspeed(gadget)) {
if (gadget->speed == USB_SPEED_HIGH)
hs = 1;
if (gadget->speed == USB_SPEED_SUPER)
ss = 1;
+ if (gadget->speed == USB_SPEED_SUPER_PLUS)
+ ssp = 1;
if (type == USB_DT_DEVICE_QUALIFIER)
hs = !hs;
}
list_for_each_entry(c, &cdev->configs, list) {
/* ignore configs that won't work at this speed */
- if (ss) {
+ if (ssp) {
+ if (!c->superspeed_plus)
+ continue;
+ } else if (ss) {
if (!c->superspeed)
continue;
} else if (hs) {