Re: [PATCH] PCI: Avoid broken MSI on SB600 USB devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> wrote:
> > 
> > > On Mon, Mar 21, 2022 at 01:34:46PM -0500, Bjorn Helgaas wrote:
> > > > From: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > > > 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@xxxxxxxxxxxxxxx
[2] https://lore.kernel.org/r/20220318210947.GA845994@bhelgaas



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux