Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2087508ybp; Thu, 10 Oct 2019 01:59:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFVuHJwwkdexiBNb+8TlramIPmHuWIEjbDWcgs4EP7wqwGattyJ8n4cQChuHEODOgpOSfd X-Received: by 2002:a05:6402:b03:: with SMTP id bm3mr7060559edb.112.1570697948910; Thu, 10 Oct 2019 01:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570697948; cv=none; d=google.com; s=arc-20160816; b=afp9z9sIVqaGm+rHtY//IYkJeLLzC06sr7oZOMAQ5Cj5h2P+id2ytGwMceAt1qjfly PELRurI/sYoUVcxteu+MRBFUsboFSV0KxIN9j3s3z7CIZtn0g6psETIXQUZKRaPGfd5u zGUJQATXcBULKpCvLiSnW8fNgBMoKWsOE8FBBTfuKavI2M73Ob95tHjSWUmWvhPmfIet FKzM7G10kfcNxCgZjCXixGAwcDM4hTG6+Fbvwllt4tYPgaIWXnxlUPRGshG/y26WCmqh QsF/D4cumo0hXRtWjDpfx/ZpD9GCFRUJNUT2NGQ7yAMIVpVGx5wmDQZmLVcblgddjKyN DKCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=4VJEy4EyqWs7SC1K2k9waxYIx2lwrMEkIBH2wCppqNY=; b=O6FZQMxkoaYDfhYtv6pc03sC4SaaqUfdIM1XBMYSvxHQ1TeTG1T/rg6FUVKVbqtKkK V7qy3vT0pBjLfU3mNe1ZLJrwEdkr9eNvt1kox714f9sVItbEacJA/DubWTyp+yTiVstl Bxdm3OQp3QrNxW/BQkT65wuBTptTk10J55GIfc7BHQjpWsx0mFnYxwxyc1J9prbwufGT EShLfsiEU95icRPPrVldnNiGyCctJ4ThFQqW+b+NXeXPd+Lg9HtWlJedXRN5yz40AF1k sYx+CZ56JoYIh5mToCSFNayaI9uuZTPinZ3VtYbTb7pGC2K5hJKS+KrTvf7EpikZRKoN J0Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w5si2618614edv.66.2019.10.10.01.58.45; Thu, 10 Oct 2019 01:59:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2389150AbfJJIpb (ORCPT + 99 others); Thu, 10 Oct 2019 04:45:31 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:6607 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2388082AbfJJIp2 (ORCPT ); Thu, 10 Oct 2019 04:45:28 -0400 X-UUID: fca862e4d84f4e6594ed4159528f2e68-20191010 X-UUID: fca862e4d84f4e6594ed4159528f2e68-20191010 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1801377807; Thu, 10 Oct 2019 16:45:19 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 10 Oct 2019 16:45:16 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 10 Oct 2019 16:45:16 +0800 Message-ID: <1570697118.32135.20.camel@mhfsdcap03> Subject: Re: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk From: Chunfeng Yun To: Tomasz Figa CC: , Mathias Nyman , "Greg Kroah-Hartman" , Matthias Brugger , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , open list , Changqi Hu , Nicolas Boichat , Shik Chen Date: Thu, 10 Oct 2019 16:45:18 +0800 In-Reply-To: <20191010075004.192818-1-tfiga@chromium.org> References: <20191010075004.192818-1-tfiga@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: B90345DAD5A894277746B2A803C573FB68AC83DB838DD9C7583D5D1E62D8AAD32000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Tomasz, On Thu, 2019-10-10 at 16:50 +0900, Tomasz Figa wrote: > MediaTek XHCI host controller does not support 64-bit addressing despite > the AC64 bit of HCCPARAMS1 register being set. The platform-specific > glue sets the DMA mask to 32 bits on its own, but it has no effect, > because xhci_gen_setup() overrides it according to hardware > capabilities. > > Use the XHCI_NO_64BIT_SUPPORT quirk to tell the XHCI core to force > 32-bit DMA mask instead. > > Signed-off-by: Tomasz Figa > --- > drivers/usb/host/xhci-mtk.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c > index b18a6baef204a..4d101d52cc11b 100644 > --- a/drivers/usb/host/xhci-mtk.c > +++ b/drivers/usb/host/xhci-mtk.c > @@ -395,6 +395,11 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) > xhci->quirks |= XHCI_SPURIOUS_SUCCESS; > if (mtk->lpm_support) > xhci->quirks |= XHCI_LPM_SUPPORT; > + /* > + * MTK host controller does not support 64-bit addressing, despite > + * having the AC64 bit of the HCCPARAMS1 register set. > + */ > + xhci->quirks |= XHCI_NO_64BIT_SUPPORT; Somes SoCs support 64bits in fact, so can't support this quirk, do you encounter any issues without this quirk? > } > > /* called during probe() after chip reset completes */ > @@ -488,11 +493,6 @@ static int xhci_mtk_probe(struct platform_device *pdev) > goto disable_clk; > } > > - /* Initialize dma_mask and coherent_dma_mask to 32-bits */ > - ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); > - if (ret) > - goto disable_clk; > - > hcd = usb_create_hcd(driver, dev, dev_name(dev)); > if (!hcd) { > ret = -ENOMEM;