Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2126285ybp; Thu, 10 Oct 2019 02:38:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzft0+g/p/EZDQF8iMnutWZ7TD6AZUZb9Wmytis5z71EY4+hAC5sFpZFnAzWUYDSUi5NOmk X-Received: by 2002:aa7:df0b:: with SMTP id c11mr7235209edy.101.1570700314247; Thu, 10 Oct 2019 02:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570700314; cv=none; d=google.com; s=arc-20160816; b=DMJoryC+XlmQw7qqJX6Fwdt74TKn0wgAsY31aAz2+BOowItNvDeRsyF9ukMe09NV8d d5mlNYKpQAmwNZhD/FjGqivRrFyS6EyuPqnyjyNYj1gDa8WVZWnkJGHc7bpD+kTWmuUv 7S6eO4E6UMer+PL98CnDyu4NVeC5H80wIA9OmOoXk2mYQKJQ2/4o+dwnRuPV1PAKvks8 2TrmJhczZB+P2V+2hqDwLhnDDHqmYVTBdenBzxDfLVVdGG30hqgCEGWScPj+K4/lLo6I mehUI6040HT5KcVugA+Ak4CBgN43VX0Zu3+Z6SL+dlZMT4Bmnaw3LFytbv2VZSNmyxJB 9wbA== 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=iUv/jKfs8Rt7LwQGuq/GRhqieGvZNRkwMu6pNwIodkk=; b=XLlHkMq6QTH/4uHJ/RwFyLJoEk19SvstEWKPtpoygJuoZPVtwB4NvkKWq6KE+VvNsE cNpEkpagttGOjInAxTgkCIwkBQT56dTTgmLJl8CDJUoNyaAbMHFe8qnMLWRLkl0Ug+Tf 9J16FCvSgyeml89lWsc2QrDoBSq5RIR6tuLsfuSXdpwtEVh0Z046Cb/T07LTUIBLkdiJ a+j/mqWFFhWUA/KrxzUJOKo5OIDCyvbDOqoFmgoTVW+us/KzclyHHJmPDJN1Mr2sr8VH ra0BNI1wBTud8LzuQ0AL50uU27nSrhX7Y4xW+ou/KnzZ1u446MFBOxqHL/MKs6PftAYu nuZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bhpLcCfY; 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 w10si2905002edv.21.2019.10.10.02.38.11; Thu, 10 Oct 2019 02:38:34 -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=bhpLcCfY; 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 S2387984AbfJJJhs (ORCPT + 99 others); Thu, 10 Oct 2019 05:37:48 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:45946 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733268AbfJJJhs (ORCPT ); Thu, 10 Oct 2019 05:37:48 -0400 Received: by mail-qk1-f193.google.com with SMTP id z67so4933705qkb.12 for ; Thu, 10 Oct 2019 02:37:46 -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=iUv/jKfs8Rt7LwQGuq/GRhqieGvZNRkwMu6pNwIodkk=; b=bhpLcCfYPyvX52+BUSSL7Yzj8Et2GDMmcum+9PP4vVeDEy1RxLq7mlfVJHrpQs/nmF HOudTuYY/jkMU9E1AxwCRYLr+GWnGHiNVIzjxkwJ8cWvxVnAHNGdpcCMyDIO+S93hPRq ys4nlW+3Gvhq+0lkrLZpM8YlHGVH0iTLqn/7k= 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=iUv/jKfs8Rt7LwQGuq/GRhqieGvZNRkwMu6pNwIodkk=; b=bIWJDxgX5GsvxwAbD6Msueg5rlxajqJi2WBtax6U6BW76e4aRRFWsHwqWMziI+F+xC fTNKZJ0aUq6GpZNj9+O310H/ijQw95ieeGmf6Jm1KvZ0w22T3lMskksdus2qF+CwGlpj WJFG0Rm/xe4LvvG+E9aohxhMzj+u9Iu7BeCmDHsZMyRYrkjTK6zJdZdQrF8eEZQeKws2 BYRxz10ltDvAgy0FIyWmExbcNza9Hnb2ktvheOCmRgyMRpOgAVDxmWgpPtVa9yUX3Ei7 RNU394RMMgJAhVVXAzp0AjKO9shapXPRxdiaWLiZ++qZZ4aqP1Ok3hhqcaO0AoKwFg85 b2zA== X-Gm-Message-State: APjAAAVTzsvJoterH5RguxYl+7bpSAAYlrm3qrwJH/EUsgM8khlX30qY omHLxucmN4bEvYkDCQw9kkAjFwlXBcbnnViG9DN5xw== X-Received: by 2002:a37:2fc1:: with SMTP id v184mr8788836qkh.18.1570700265436; Thu, 10 Oct 2019 02:37:45 -0700 (PDT) MIME-Version: 1.0 References: <20191010075004.192818-1-tfiga@chromium.org> In-Reply-To: From: Nicolas Boichat Date: Thu, 10 Oct 2019 17:37:34 +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 5:11 PM Tomasz Figa wrote: > > On Thu, Oct 10, 2019 at 6:08 PM Nicolas Boichat wrote: > > > > 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) > > > > The problem with Fixes: is that this patch depends on the quirk being > there, but the offending code was merged earlier. Do you know how to > handle such cases? Oh, interesting. I think this is documented here: https://github.com/torvalds/linux/blob/master/Documentation/process/stable-kernel-rules.rst Something like this: Cc: # 3.3.x: a1f84a3: sched: Check for idle Cc: # 3.3.x (Where 3.3.x is the first release that contains the commit indicated in the Fixes tag) Try that, worst case you'll get automated emails from stable maintainers asking you how to fix the issue. > > > > > > --- > > > 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 > > >