lkml.org 
[lkml]   [2022]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@kernel.org> wrote:
> >
> > > On Mon, Mar 21, 2022 at 01:34:46PM -0500, Bjorn Helgaas wrote:
> > > > From: Bjorn Helgaas <bhelgaas@google.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

\
 
 \ /
  Last update: 2022-03-23 14:24    [W:0.078 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site