Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2097777ybp; Thu, 10 Oct 2019 02:08:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzchYaoNDAlePSsyhdiN+cp3abnbwSUJwPmWX2yBi9invO6QnzXUZ5o17pQsxXuItI/HkuH X-Received: by 2002:a17:906:5292:: with SMTP id c18mr6998145ejm.129.1570698519777; Thu, 10 Oct 2019 02:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570698519; cv=none; d=google.com; s=arc-20160816; b=pfiz9UpEx2qCx/PleQ089O3SBMaNqxSvyLLT7HC4S4pyORlEeSgAxKdNsmIPrhA0AI s4vKNJHZYVvtau8Eya1uAM8De08BZ77HOVTHXIvKxQy6NtUXTvdjP9atUlOqedtiEcs7 Qt53V0ZmO++9B+RDucouazhfPmCvhkqeiv6khw74ZceXFD5EYWTJ6uzzbHSMYnEwXH3E svP8XI9Ff3MVrK+yukhbYKIW9HZRrCGrposWVEeN/LE73ft/SNtqUePZpEekuLlr6I5U FhoSK58n+rHXCM8UvkahZF/+raGICL9qGm4781u+Im7ImnPTXVWj8qseGZvjr7Yh16UA 7H+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Xx/5ivC8+wB4MKu4yR0Ppryr6BtLEmc7x2YuwNcfbiU=; b=vvbWhuXs8lMleIAmDNNw19XEzWkr1oxyS900fnha4i3uc7E+/rzsZh33abvh4Qp0K2 jkNHxVSX6eumzwVxla50/Vyze5zswDXdbDEWiWIR7ENbp8NGbL8nkgD/oGVmPQ7yKF6S EohW1OXTg4iAKiYg03PUHbOo1ImeW2DLs0eUSacl2wfRWpljB4UFDVtX6NNA1UtEXVPW WdUZ3aUMJqAP0+mBoTIgfspLgvfnHAC+VAC8akW+lPTvOjiUjCFnKc+FroIdmoa6hwt/ w0TQl21Yhtu9BxwpIoCWoBXJEUxHPHCT26E8gsuyOyWjuE8q7Axtcc0s312u/eor/GAK JRgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aXFXLXf9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si2855294eju.15.2019.10.10.02.08.16; Thu, 10 Oct 2019 02:08:39 -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; dkim=pass header.i=@chromium.org header.s=google header.b=aXFXLXf9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733302AbfJJJIL (ORCPT + 99 others); Thu, 10 Oct 2019 05:08:11 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:43400 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733144AbfJJJIL (ORCPT ); Thu, 10 Oct 2019 05:08:11 -0400 Received: by mail-qk1-f195.google.com with SMTP id h126so4886737qke.10 for ; Thu, 10 Oct 2019 02:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Xx/5ivC8+wB4MKu4yR0Ppryr6BtLEmc7x2YuwNcfbiU=; b=aXFXLXf9WNQKvFcjlU5MlohqPWQ9c1GEapMUp8kn9Ji0Nf0Y2DalUZ21YIV5w9Yoek jS5WJkBJ73QscZEwUM1J3bb+pqYpmN6gNG+8hziyOILEc/Cv2klTVlREuWhXT94Mgm7+ 7xvF6ObloyQdvyA9Vj0umU7uNASrYs6sHJAp0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xx/5ivC8+wB4MKu4yR0Ppryr6BtLEmc7x2YuwNcfbiU=; b=pNPMUOqvWBC7BdMcL5X5p6Ccbzv2cxj+4Cd+nXfOZdLggWVy4zDH6SNUyCxPhQ/Dhr Du7YLjiI9qpPUejLcYE17f4EEn0uvcyqoEMh2f5LS0tt2ItJwAHHrZgSgrkHsKtitEIg 9mFo3pnpytZonkILqF27Qpz0B+VA97PdLUzSG5wWs4CxcIK3HW+fiDTDiW7ZodyMsc8z +VtruJ/un/G3rQFJBDQkCDQrzrIy2eQSruRO2FeNM/DGq6VkR2khxxWy6wYWdxUStZ5G z6t1hR0EbS/nKeh92ZdeI1N9NgHWLY+LBhDxy61ag/v9BZfdyB/LPpg47JrZXi8eecx+ uI3Q== X-Gm-Message-State: APjAAAUWZssxaSj1cTCSeO340UmuDBvlHYeBfEFYqIISojEsNg9DjXdz CdXaJLC0dP48HYjlw71WnLy0CobrTpW5d4c8N48UPQ== X-Received: by 2002:a37:342:: with SMTP id 63mr8915746qkd.144.1570698489815; Thu, 10 Oct 2019 02:08:09 -0700 (PDT) MIME-Version: 1.0 References: <20191010075004.192818-1-tfiga@chromium.org> In-Reply-To: <20191010075004.192818-1-tfiga@chromium.org> From: Nicolas Boichat Date: Thu, 10 Oct 2019 17:07:58 +0800 Message-ID: Subject: Re: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk To: Tomasz Figa Cc: linux-usb@vger.kernel.org, Mathias Nyman , Greg Kroah-Hartman , Matthias Brugger , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , open list , Chunfeng Yun , Changqi Hu , Shik Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 10, 2019 at 3:50 PM 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 Can we add a Fixes: tag for stable backports? (after addressing the other comments of course) > --- > 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; > } > > /* 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; > -- > 2.23.0.581.g78d2f28ef7-goog >