diff options
author | John Youn <John.Youn@synopsys.com> | 2016-02-05 17:07:30 -0800 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 15:14:25 +0200 |
commit | 4eb8e32dabef701e481ae18d7f5a4a6b850cccc9 (patch) | |
tree | b12bb504a68a46ef8a27bb30926781554af5f061 /drivers/usb/gadget/composite.c | |
parent | eae5820b852f2b434fc7734b5b1226bcc4ae9b92 (diff) | |
download | linux-4eb8e32dabef701e481ae18d7f5a4a6b850cccc9.tar.bz2 |
usb: gadget: composite: Configure the usb_ep for SuperSpeedPlus
Configure the usb_ep using the SuperSpeedPlus descriptors if 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/composite.c')
-rw-r--r-- | drivers/usb/gadget/composite.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index b938fcfee235..60b6e4b4c7e5 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -148,6 +148,13 @@ int config_ep_by_speed(struct usb_gadget *g, /* select desired speed */ switch (g->speed) { + case USB_SPEED_SUPER_PLUS: + if (gadget_is_superspeed_plus(g)) { + speed_desc = f->ssp_descriptors; + want_comp_desc = 1; + break; + } + /* else: Fall trough */ case USB_SPEED_SUPER: if (gadget_is_superspeed(g)) { speed_desc = f->ss_descriptors; @@ -191,7 +198,7 @@ ep_found: (comp_desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP)) return -EIO; _ep->comp_desc = comp_desc; - if (g->speed == USB_SPEED_SUPER) { + if (g->speed >= USB_SPEED_SUPER) { switch (usb_endpoint_type(_ep->desc)) { case USB_ENDPOINT_XFER_ISOC: /* mult: bits 1:0 of bmAttributes */ |