Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: gadget: Set gadget_max_speed when set ssp_rate

Set the dwc->gadget_max_speed to SuperSpeed Plus if the user sets the
ssp_rate. The udc_set_ssp_rate() is intended for setting the gadget's
speed to SuperSpeed Plus at the specified rate.

Fixes: 072cab8a0fe2 ("usb: dwc3: gadget: Implement setting of SSP rate")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/0b2732e2f380d9912ee87f39dc82c2139223bad9.1615254129.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thinh Nguyen and committed by
Greg Kroah-Hartman
cdb651b6 5e4010e3

+1
+1
drivers/usb/dwc3/gadget.c
··· 2523 2523 unsigned long flags; 2524 2524 2525 2525 spin_lock_irqsave(&dwc->lock, flags); 2526 + dwc->gadget_max_speed = USB_SPEED_SUPER_PLUS; 2526 2527 dwc->gadget_ssp_rate = rate; 2527 2528 spin_unlock_irqrestore(&dwc->lock, flags); 2528 2529 }