Skip to content

Commit

Permalink
usb: cdnsp: Fix incorrect supported maximum speed
Browse files Browse the repository at this point in the history
commit aa82f94 upstream.

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: 3d82904 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
pawellcdns authored and gregkh committed Aug 12, 2021
1 parent 9510864 commit e170a01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/cdns3/cdnsp-gadget.c
Expand Up @@ -1881,7 +1881,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);
Expand Down

0 comments on commit e170a01

Please sign in to comment.