Skip to content

Commit

Permalink
usb: cdnsp: Fix incorrect supported maximum speed
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Chen <[email protected]>
  • Loading branch information
pawellcdns authored and Peter Chen committed Jul 29, 2021
1 parent aa35772 commit aa82f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/cdns3/cdnsp-gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit aa82f94

Please sign in to comment.