summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>2021-03-08 18:16:44 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-23 13:21:24 +0100
commitcdb651b6021ee091abc24e9fbd9774d318ab96a6 (patch)
treec0ccacbfde7dae59ad47f1072a1d6ab646568ece /drivers
parent5e4010e36a58978e42b2ee13739ff9b50209c830 (diff)
downloadlinux-stable-cdb651b6021ee091abc24e9fbd9774d318ab96a6.tar.gz
linux-stable-cdb651b6021ee091abc24e9fbd9774d318ab96a6.tar.bz2
linux-stable-cdb651b6021ee091abc24e9fbd9774d318ab96a6.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/gadget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 4a337f348651..006476a4737b 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2523,6 +2523,7 @@ static void dwc3_gadget_set_ssp_rate(struct usb_gadget *g,
unsigned long flags;
spin_lock_irqsave(&dwc->lock, flags);
+ dwc->gadget_max_speed = USB_SPEED_SUPER_PLUS;
dwc->gadget_ssp_rate = rate;
spin_unlock_irqrestore(&dwc->lock, flags);
}