From: Tomasz Figa <tfiga@chromium.org>
To: Nicolas Boichat <drinkcat@chromium.org>
Cc: Changqi Hu <Changqi.Hu@mediatek.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>,
Chunfeng Yun <chunfeng.yun@mediatek.com>,
Shik Chen <shik@chromium.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk
Date: Thu, 10 Oct 2019 19:09:06 +0900 [thread overview]
Message-ID: <CAAFQd5AZjiMuwaMTjy_1ftop+=E6_G7OGAs0+tD5SdJeW0AOLA@mail.gmail.com> (raw)
In-Reply-To: <CANMq1KA7pKqJDhFvkuBfEWtr81NUhyRpUE9ZZeTNCCc5Fphoyw@mail.gmail.com>
On Thu, Oct 10, 2019 at 6:37 PM Nicolas Boichat <drinkcat@chromium.org> wrote:
>
> On Thu, Oct 10, 2019 at 5:11 PM Tomasz Figa <tfiga@chromium.org> wrote:
> >
> > On Thu, Oct 10, 2019 at 6:08 PM Nicolas Boichat <drinkcat@chromium.org> wrote:
> > >
> > > On Thu, Oct 10, 2019 at 3:50 PM Tomasz Figa <tfiga@chromium.org> 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 <tfiga@chromium.org>
> > >
> > > 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: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle
> Cc: <stable@vger.kernel.org> # 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.
>
Oh, great, thanks a lot!
Best regards,
Tomasz
> >
> > >
> > > > ---
> > > > 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
> > > >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-10-10 10:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 7:50 [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk Tomasz Figa
2019-10-10 8:45 ` Chunfeng Yun
2019-10-10 9:00 ` Tomasz Figa
2019-10-10 10:59 ` Chunfeng Yun
2019-10-11 4:35 ` Tomasz Figa
2019-10-11 6:53 ` Chunfeng Yun
2019-10-30 8:14 ` Chunfeng Yun
2019-11-07 4:26 ` Tomasz Figa
2019-10-10 9:07 ` Nicolas Boichat
2019-10-10 9:11 ` Tomasz Figa
2019-10-10 9:37 ` Nicolas Boichat
2019-10-10 10:09 ` Tomasz Figa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAFQd5AZjiMuwaMTjy_1ftop+=E6_G7OGAs0+tD5SdJeW0AOLA@mail.gmail.com' \
--to=tfiga@chromium.org \
--cc=Changqi.Hu@mediatek.com \
--cc=chunfeng.yun@mediatek.com \
--cc=drinkcat@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=shik@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).