From mboxrd@z Thu Jan 1 00:00:00 1970 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 E452FC4332F for ; Fri, 10 Sep 2021 12:32:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF3C8611C0 for ; Fri, 10 Sep 2021 12:32:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233804AbhIJMdg (ORCPT ); Fri, 10 Sep 2021 08:33:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:51002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233692AbhIJMdR (ORCPT ); Fri, 10 Sep 2021 08:33:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77037611CE; Fri, 10 Sep 2021 12:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631277127; bh=24WADtF1nlCF5+DsbBKx77QjJcAUjTpmnx8sRSvWoek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AH0V6+yd07xvvmvhIqgmv7TmOJYJvzJB0OFO9mXBEQkhaKJVRrE1stBMwawMfFJzK 7x1FciKmRZF1ydhwG9+wXRMUYNwuTR8QN3PYHCUjJFtT3hLaXIUnN09cgwPSi48IYY WAQ5xPs7nDJgajcvUSKANTsqUusbiFv3BqhM9d9I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi , Chunfeng Yun Subject: [PATCH 5.13 13/22] usb: cdnsp: fix the wrong mult value for HS isoc or intr Date: Fri, 10 Sep 2021 14:30:12 +0200 Message-Id: <20210910122916.365208009@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910122915.942645251@linuxfoundation.org> References: <20210910122915.942645251@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: stable@vger.kernel.org From: Chunfeng Yun commit e9ab75f26eb9354dfc03aea3401b8cfb42cd6718 upstream. 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@vger.kernel.org Acked-by: Felipe Balbi Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1628836253-7432-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/cdns3/cdnsp-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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( 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; }