Re: [RFE PATCH] pci: Do not enable intx on MSI-capable devices on shutdown

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

 



On 10/25/2016 06:16 PM, Keith Busch wrote:
> On Tue, Oct 25, 2016 at 03:08:54PM -0400, Prarit Bhargava wrote:
>> When pci_disable_msi() is currently called the result is that device is
>> switched back to intx and then the MSI IRQs are free'd.  This patch would
>> modify that behavior, and intx would not be reenabled when pci_disable_msix()
>> was called during runtime.  With the system_state patch we're only affecting
>> shutdown, which is seen as less risky than doing
> 
> My proposal isn't really modifying exisiting behavior since if it does,
> the currently in place expectations are being violated: if anyone calls
> "pci_disable_msi" with actions on the irqs being disabled, they're
> already screwed since they will hit the BUG_ON in free_msi_irqs.

I thought msi_has_action() would have returned 1 until free_msi_irqs() was
called.  Yes, your patch would work.

I also want to add this interesting tidbit:  I have noticed in the past that
*many* systems no longer print the

 Restarting system.
 reboot: machine restart

[and some also print an extra line of, "ACPI MEMORY or I/O RESET_REG"]

messages at the end of boot.  For a long time I had assumed that this was
because the reboot was racing with printk somehow and that the system shutdown
or rebooted before those lines made it "out" through the serial port.

With the previously rejected patch from

https://patchwork.kernel.org/patch/5990701/

the messages are output to the screen again (I'm not 100% sure on this but I
think this is occurring for systems where the serial port or usb port is behind
a pci device).  This result lends more support to the idea that we're doing
something wrong by blindly disabling msi/x interrupts when the driver doesn't
support it.

There are several ways of fixing this, and I'm not sure one is better than the
other.  It seems no matter what we do here there's risk of breaking something
and I'm leaning towards fixing this by only calling the msi disable code when a
shutdown function has been called.

Bjorn, I'd like to hear what you think...

P.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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