Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp636515pxt; Thu, 12 Aug 2021 06:27:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMkcP3Rq7UJXf6Tv3YyV8amqexZTqPmCsBo0QZHGDBJOJDs+CM4ahLSB933bv8cM0bgeuv X-Received: by 2002:a17:906:76da:: with SMTP id q26mr3661899ejn.402.1628774877094; Thu, 12 Aug 2021 06:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628774877; cv=none; d=google.com; s=arc-20160816; b=zRlyfoBvBAaAyP6VvBoX69ixc2cs4HFmI+L+MuFPfqHsPSUduVkECjgtigWqa5zfK0 UqNaHyDZxoy5svpMtnJ3xjtlvYAYBfTXFxB9Q/604ZGIHE2SQsg9a78NXrqMwAqw9PWa lkP7QM0PMfoIc/Ync6LT55Be85eblYw0aMz2r/yPHTIpTrYf9A4eRtmdWh1Fpp2TBKzI 6UIotmiezKcc1RxS8owzf6rQD3PpagT1f76rW77C2+9hYyBzRR8WEqbgUcr9xb3FcQ6S f1Uun20eYumEL7/bxMoeeAcR6RFhiZvd5ZtccWTVClwmu5bPiL+9yXwMyJM/QRqUFai8 Q9bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=/KLi0qNMeHww6afZUT96gRBUXmUWABt5GlU7MCWCV/c=; b=fbUqFGCwcFExAxt++RhW0xnulKUrpePIlsVreFmW2SYvFbXdz7IIjLA5saIMnm8xb/ ND+NeiCmgfIc0pWJoh9XQPOL1PeoNfXd2cGso6zfDmqlLhTWRqUoXJOUt0LPHjr/VLgw 3m+qdO1Lgw+FskBd+nDIHapVsMaf9sc6BRDVNBo2o2K7fi4NpxzI9YXeOVnaoQc3urB7 XCWk9Y10JEm15N1/B+y+Uqk38wkNS7oFIe7vSYMmFaDJdjSoKTd/I8BYj0wdNTEc72Vi GH2JD5zzIbP9eyVTnA/Noij5CFsnHiVvrTSWkkAOZp/BZivoSXCZrnxxiFuqC2L0puc/ c1wQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk43si2551914ejc.325.2021.08.12.06.27.33; Thu, 12 Aug 2021 06:27:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237724AbhHLNXO (ORCPT + 99 others); Thu, 12 Aug 2021 09:23:14 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:41580 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S237431AbhHLNTJ (ORCPT ); Thu, 12 Aug 2021 09:19:09 -0400 X-UUID: 37a7f522bd944d17bece7130f9292970-20210812 X-UUID: 37a7f522bd944d17bece7130f9292970-20210812 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1070657437; Thu, 12 Aug 2021 21:18:41 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 12 Aug 2021 21:18:40 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 Aug 2021 21:18:39 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Felipe Balbi CC: Pawel Laszczak , Al Cooper , Thierry Reding , Jonathan Hunter , Chunfeng Yun , Matthias Brugger , Christophe JAILLET , Yang Yingliang , Rikard Falkeborn , , , , , , , Eddie Hung , stable Subject: [PATCH v2 4/7] usb: cdnsp: fix the wrong mult value for HS isoc or intr Date: Thu, 12 Aug 2021 21:18:00 +0800 Message-ID: <1628774283-475-4-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1628774283-475-1-git-send-email-chunfeng.yun@mediatek.com> References: <1628774283-475-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org usb_endpoint_maxp() only returns the bit[10:0] of wMaxPacketSize of endpoint descriptor, not include bit[12:11] anymore, so use usb_endpoint_maxp_mult() instead. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Cc: stable Acked-by: Felipe Balbi Signed-off-by: Chunfeng Yun --- v2: add fixes, cc suggested by Felipe --- drivers/usb/cdns3/cdnsp-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/cdns3/cdnsp-mem.c b/drivers/usb/cdns3/cdnsp-mem.c index a47948a1623f..ad9aee3f1e39 100644 --- a/drivers/usb/cdns3/cdnsp-mem.c +++ b/drivers/usb/cdns3/cdnsp-mem.c @@ -882,7 +882,7 @@ static u32 cdnsp_get_endpoint_max_burst(struct usb_gadget *g, if (g->speed == USB_SPEED_HIGH && (usb_endpoint_xfer_isoc(pep->endpoint.desc) || usb_endpoint_xfer_int(pep->endpoint.desc))) - return (usb_endpoint_maxp(pep->endpoint.desc) & 0x1800) >> 11; + return usb_endpoint_maxp_mult(pep->endpoint.desc) - 1; return 0; } -- 2.18.0