Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2504220pxj; Mon, 10 May 2021 04:43:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6Dv/Sl/ndXJH5r813toypZ+N1RDcCLFLtkmV6uxk/9WupFdMje1DkTsTav+e3fBvD8RH4 X-Received: by 2002:a17:906:e2d6:: with SMTP id gr22mr25905961ejb.356.1620646999029; Mon, 10 May 2021 04:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620646999; cv=none; d=google.com; s=arc-20160816; b=TobrLOumM4bKiz80idnXkpE/y+8EAKcqpSh0+ThQv5orbGW65fMSp3x51staFqCGhr 23fEOZrBZ1TgS7dSCex4TLxGoQyVGlD/u03FZCf/kQk11nKHLJEyJHJKJe7ebgiYHblF 5qf++xutxnwSPmUd0D7gxoLfJtKj7obRXJXoF4TNjLQu0JK1bubOBrsh6i8OFP56wc+S jlWgfBQHCIL71Yhpm9LnFfXKsh34fRw0Al/E5injW0Swj13sewcIdQXEmV5PI/HE1jg9 iLbIFvik/xXejH1f+ju8NlFTQriN8/XyWVv7BeStcmn+OwuCe+R299zVoC5Hst4vWoKa 1/5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/rTFup/LW++Qe5ILbFj9Yx3VotX8e9aIOJ1lOmcZ5yg=; b=a1NdBqQQOrk5SwnG/0p7u4Z8gIo5LrxPj4lIvUpiXdPwBqPf5vX71yyXQ9rsVliARZ s3TJf/L+E9aZcwS57EgKo56NiXBDLDlFwFA4PsJ1/Cf4s7V1LbbyGRub20a9O9ByFy5w Mq7oY/fxH+kywbMyfzUnLHjgkx9kQSfsp4sjDjI+02XDcGh2G0jbDsOMEm7V0reXfkPg ySR5fvvjIONCMM27eTiwxZfn6NXdPj5xaJp/41Gtn4TtW4Hozb12Hg3YQyTYrlaCFMq5 hXEW/l39u7i+sTJQF1dl/D6Q+9zRP3eafgRnlGPi6HeygcBcWBwZLYMJ60nxQ0VdASEr X46w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nGYfAKaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si14092009ejp.14.2021.05.10.04.42.54; Mon, 10 May 2021 04:43:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nGYfAKaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241182AbhEJLhp (ORCPT + 99 others); Mon, 10 May 2021 07:37:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:52738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233866AbhEJKzc (ORCPT ); Mon, 10 May 2021 06:55:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78FD861AC0; Mon, 10 May 2021 10:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643360; bh=iGg2rkR9LvqocJcMaj2Kj1zQhYKuImPMlBsYVy7Kfbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGYfAKafFI2RohHn7UhRTbcEUIbe5sRe36p0dzZRdAZfPN1J9fXDhdO4gfCw6Lse/ 9kyizMB2dMYXrSmiImpKBX5YdaIC0Mo8aHojDa/n0vTF32vwfjZAJLpBv0ATiTkTT/ Yyrxs+uou/qcD3q5xmZFu+7tOcjS3qxD49a8hw7c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi , Thinh Nguyen Subject: [PATCH 5.10 284/299] usb: dwc3: gadget: Remove FS bInterval_m1 limitation Date: Mon, 10 May 2021 12:21:21 +0200 Message-Id: <20210510102014.303962446@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thinh Nguyen commit 3232a3ce55edfc0d7f8904543b4088a5339c2b2b upstream. The programming guide incorrectly stated that the DCFG.bInterval_m1 must be set to 0 when operating in fullspeed. There's no such limitation for all IPs. See DWC_usb3x programming guide section 3.2.2.1. Fixes: a1679af85b2a ("usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1") Cc: Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/5d4139ae89d810eb0a2d8577fb096fc88e87bfab.1618472454.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/gadget.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -608,12 +608,14 @@ static int dwc3_gadget_set_ep_config(str u8 bInterval_m1; /* - * Valid range for DEPCFG.bInterval_m1 is from 0 to 13, and it - * must be set to 0 when the controller operates in full-speed. + * Valid range for DEPCFG.bInterval_m1 is from 0 to 13. + * + * NOTE: The programming guide incorrectly stated bInterval_m1 + * must be set to 0 when operating in fullspeed. Internally the + * controller does not have this limitation. See DWC_usb3x + * programming guide section 3.2.2.1. */ bInterval_m1 = min_t(u8, desc->bInterval - 1, 13); - if (dwc->gadget->speed == USB_SPEED_FULL) - bInterval_m1 = 0; if (usb_endpoint_type(desc) == USB_ENDPOINT_XFER_INT && dwc->gadget->speed == USB_SPEED_FULL)