From patchwork Tue Mar 9 02:16:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 396470 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EBACC43381 for ; Tue, 9 Mar 2021 02:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0073C652BD for ; Tue, 9 Mar 2021 02:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbhCICRI (ORCPT ); Mon, 8 Mar 2021 21:17:08 -0500 Received: from smtprelay-out1.synopsys.com ([149.117.73.133]:34608 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbhCICQp (ORCPT ); Mon, 8 Mar 2021 21:16:45 -0500 Received: from mailhost.synopsys.com (sv1-mailhost1.synopsys.com [10.205.2.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id A667D4016B; Tue, 9 Mar 2021 02:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1615256205; bh=LzV3W6moBk7atuKQ8g/fYRr9qhafHcwgywKKZEEIrl8=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=i1CtvjaWaaECWGycPF75jKqJoLSA3Ud0u4MVm/Tpezg+S7VM3aBP39gm6TWkmMVtw /1fm7Tb3Jsz5VVOA67gBOM6pjEB7qLNG2WyS7Z9kX4fhqQ4yra6riVowpgUT+grGez vahz0tzKPFuPDWl1zcZr7LWDEVPMTg2vdioFNI/uOY37gjYUwwDiaLDQ7g1C+vaZaQ yEDeUpkgc7oryoSE17OYk2ic2L6zpncBQMrggG4u99AzlniDnErH5k3lVVpyW6rg6N D+PxqaxA+jEy4SrZiW5SRtA+LtjLgRX6kBaIb6ud4l8525XKmLOxp21m0tr3/heelj 8esuIal2wKKJQ== Received: from lab-vbox (unknown [10.205.145.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPSA id 75DB2A005E; Tue, 9 Mar 2021 02:16:44 +0000 (UTC) Received: by lab-vbox (sSMTP sendmail emulation); Mon, 08 Mar 2021 18:16:44 -0800 Date: Mon, 08 Mar 2021 18:16:44 -0800 Message-Id: <0b2732e2f380d9912ee87f39dc82c2139223bad9.1615254129.git.Thinh.Nguyen@synopsys.com> In-Reply-To: References: X-SNPS-Relay: synopsys.com From: Thinh Nguyen Subject: [PATCH 1/2] usb: dwc3: gadget: Set gadget_max_speed when set ssp_rate To: Felipe Balbi , Greg Kroah-Hartman , Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org Cc: John Youn , Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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. Cc: Fixes: 072cab8a0fe2 ("usb: dwc3: gadget: Implement setting of SSP rate") Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index aebcf8ec0716..53696c4bed0a 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); }