usb: dwc3: Check controller type before setting speed
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Fri, 16 Mar 2018 22:35:57 +0000 (15:35 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 22 Mar 2018 08:49:03 +0000 (10:49 +0200)
commit2f3090c6a8f24d92ea569b099c5bdb5679dcf08a
treeaab75bfe05c3e940ebbbafec042dbb7b90dce337
parent80b776340c78cb2b5755e9a1a04add640c23b436
usb: dwc3: Check controller type before setting speed

DWC_usb3 speed can only be set up to SuperSpeed. Limit the setting to
SuperSpeed only should the value be higher. Otherwise, the controller
will read an invalid speed value and set the device to an incorrect
speed.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c