[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220323132343.GA1282700@bhelgaas>
Date: Wed, 23 Mar 2022 08:23:43 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
linux-pci <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mick Lorain <micklorain@...tonmail.com>,
Alex Williamson <alex.williamson@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH] PCI: Avoid broken MSI on SB600 USB devices
On Wed, Mar 23, 2022 at 12:43:48PM +0000, David Woodhouse wrote:
> On Wed, 2022-03-23 at 10:03 +0200, Andy Shevchenko wrote:
> > On Wed, Mar 23, 2022 at 4:26 AM Bjorn Helgaas <helgaas@...nel.org> wrote:
> >
> > > On Mon, Mar 21, 2022 at 01:34:46PM -0500, Bjorn Helgaas wrote:
> > > > From: Bjorn Helgaas <bhelgaas@...gle.com>
> > > > Some ATI SB600 USB adapters advertise MSI, but if INTx is disabled by
> > > > setting PCI_COMMAND_INTX_DISABLE,
> >
> > > > MSI doesn't work either.
> >
> > I think this is not correct.
>
> I think it was perfectly correct until you added a couple of newlines
> in the middle of the sentence, then took it out of context. :)
>
> "If INTX is disabled, MSI doesn't work either".
>
> But really, in that case surely the solution is *not* to disable INTX
> for this device. Then MSI will work, right?
That's what Andy's original patch [1] does, and MSI *does* work if we
skip disabling INTx.
I'm hesitant [2] about that approach because it creates two classes of
devices using MSI (most have INTx disabled but a few do not), which
makes it harder to reason about them. For example, there are non-MSI
paths that read or set the "disable INTx" bit, so we have to consider:
- will readers be surprised if a device using MSI has INTx enabled?
- will writers care disabling INTx disables *all* interrupts, not
just INTx?
So skipping the INTx disable certainly works most of the time and
*likely* works all the time, but there are cases that could be
problems and we don't have a compelling reason to use MSI on these
devices.
[1] https://lore.kernel.org/r/20220314101448.90074-1-andriy.shevchenko@linux.intel.com
[2] https://lore.kernel.org/r/20220318210947.GA845994@bhelgaas
Powered by blists - more mailing lists