aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/cdns3
diff options
context:
space:
mode:
authorPawel Laszczak <pawell@cadence.com>2021-06-25 12:25:02 +0200
committerPeter Chen <peter.chen@zeku.com>2021-07-29 14:13:02 +0800
commitaa82f94e869edd72f4fadb08c6ffca8927e4934e (patch)
tree745b45b02a829cb6e5e67f9b6c7d6375324d7f6d /drivers/usb/cdns3
parentusb: cdns3: Fixed incorrect gadget state (diff)
downloadwireguard-linux-aa82f94e869edd72f4fadb08c6ffca8927e4934e.tar.xz
wireguard-linux-aa82f94e869edd72f4fadb08c6ffca8927e4934e.zip
usb: cdnsp: Fix incorrect supported maximum speed
Driver had hardcoded in initialization maximum supported speed to USB_SPEED_SUPER_PLUS but it should consider the speed returned from usb_get_maximum_speed function. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak <pawell@cadence.com> Link: https://lore.kernel.org/r/20210625102502.26336-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen <peter.chen@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3')
-rw-r--r--drivers/usb/cdns3/cdnsp-gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/cdnsp-gadget.c b/drivers/usb/cdns3/cdnsp-gadget.c
index c23f53e9b1ef..27df0c697897 100644
--- a/drivers/usb/cdns3/cdnsp-gadget.c
+++ b/drivers/usb/cdns3/cdnsp-gadget.c
@@ -1882,7 +1882,7 @@ static int __cdnsp_gadget_init(struct cdns *cdns)
pdev->gadget.name = "cdnsp-gadget";
pdev->gadget.speed = USB_SPEED_UNKNOWN;
pdev->gadget.sg_supported = 1;
- pdev->gadget.max_speed = USB_SPEED_SUPER_PLUS;
+ pdev->gadget.max_speed = max_speed;
pdev->gadget.lpm_capable = 1;
pdev->setup_buf = kzalloc(CDNSP_EP0_SETUP_SIZE, GFP_KERNEL);