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=-15.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 D2B81C433E6 for ; Tue, 21 Jul 2020 12:05:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9CAF21702 for ; Tue, 21 Jul 2020 12:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595333156; bh=kGkhwcKxerZDegHd9mW67g/82+hU4fEoctQiRLlBaMg=; h=Subject:To:From:Date:List-ID:From; b=P3+99PPbxcfoe+TwvTFq4ReromHfqJywqXNpC5yc9pasQwFgUJ8Mv2wObxf7+3dHr nSOpNCNKxXCvVh3t2xNwxJtiM8/zhm+SKdNq8+rLJIk+27NHEIBl3k9DcKmi7PNM5A QsMw5Id3+lPZ6/Db8t/3rNOea57ofOEtl6CQdN2g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728196AbgGUMF4 (ORCPT ); Tue, 21 Jul 2020 08:05:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:36072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbgGUMF4 (ORCPT ); Tue, 21 Jul 2020 08:05:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9B6A20771; Tue, 21 Jul 2020 12:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595333155; bh=kGkhwcKxerZDegHd9mW67g/82+hU4fEoctQiRLlBaMg=; h=Subject:To:From:Date:From; b=K0kQz08kW06wVP2B5mVhGJ51YAZVJbpCRalrI4fjf1mTa3MK31xipEMZVQfq0ex0j LCiabQWmdJey/Jng2iM8dBwt1wRb5QsiAQtyMVL14yiDn6BbgQF6QmpXOE8arjdN8P wPduxBOBNAjCzXkA7cp5BjXHE7d461MRKPxeMk6A= Subject: patch "usb: xhci-mtk: fix the failure of bandwidth allocation" added to usb-linus To: chunfeng.yun@mediatek.com, gregkh@linuxfoundation.org, stable@vger.kernel.org From: Date: Tue, 21 Jul 2020 14:06:03 +0200 Message-ID: <15953331637073@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled usb: xhci-mtk: fix the failure of bandwidth allocation to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 5ce1a24dd98c00a57a8fa13660648abf7e08e3ef Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Fri, 10 Jul 2020 13:57:52 +0800 Subject: usb: xhci-mtk: fix the failure of bandwidth allocation The wMaxPacketSize field of endpoint descriptor may be zero as default value in alternate interface, and they are not actually selected when start stream, so skip them when try to allocate bandwidth. Cc: stable Fixes: 0cbd4b34cda9 ("xhci: mediatek: support MTK xHCI host controller") Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1594360672-2076-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-mtk-sch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index fea555570ad4..45c54d56ecbd 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -557,6 +557,10 @@ static bool need_bw_sch(struct usb_host_endpoint *ep, if (is_fs_or_ls(speed) && !has_tt) return false; + /* skip endpoint with zero maxpkt */ + if (usb_endpoint_maxp(&ep->desc) == 0) + return false; + return true; } -- 2.27.0