Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755829AbdCGQWY (ORCPT ); Tue, 7 Mar 2017 11:22:24 -0500 Received: from mga01.intel.com ([192.55.52.88]:25896 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932775AbdCGQVi (ORCPT ); Tue, 7 Mar 2017 11:21:38 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,258,1484035200"; d="scan'208";a="1105794856" Subject: Re: [PATCH 1/2] usb: xhci-mtk: check hcc_params after adding primary hcd To: Chunfeng Yun , Mathias Nyman References: <1488857543-9384-1-git-send-email-chunfeng.yun@mediatek.com> Cc: Matthias Brugger , Felipe Balbi , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-mediatek@lists.infradead.org, Greg Kroah-Hartman , Thierry Reding From: Mathias Nyman Message-ID: <58BECD83.9000205@linux.intel.com> Date: Tue, 7 Mar 2017 17:10:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1488857543-9384-1-git-send-email-chunfeng.yun@mediatek.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1246 Lines: 40 On 07.03.2017 05:32, Chunfeng Yun wrote: > hcc_params is set in xhci_gen_setup() called from usb_add_hcd(), > so checks the Maximum Primary Stream Array Size in the hcc_params > register after adding primary hcd. > > Signed-off-by: Chunfeng Yun > --- > drivers/usb/host/xhci-mtk.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c > index 9066ec9..6ac73a6 100644 > --- a/drivers/usb/host/xhci-mtk.c > +++ b/drivers/usb/host/xhci-mtk.c > @@ -678,13 +678,13 @@ static int xhci_mtk_probe(struct platform_device *pdev) > goto power_off_phys; > } > > - if (HCC_MAX_PSA(xhci->hcc_params) >= 4) > - xhci->shared_hcd->can_do_streams = 1; > - > ret = usb_add_hcd(hcd, irq, IRQF_SHARED); > if (ret) > goto put_usb3_hcd; > > + if (HCC_MAX_PSA(xhci->hcc_params) >= 4) > + xhci->shared_hcd->can_do_streams = 1; > + > ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED); > if (ret) > goto dealloc_usb2_hcd; > Thanks. Looks like streams check has never worked for Mediatek xHC hosts, Do you know if this has caused any issues? looks like it should go usb-linus and maybe stable kernels as well. -Mathias