RE: [RFC PATCH] Let device drivers disable msi on shutdown

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

 



On Tue, 24 Jun 2014, Elliott, Robert (Server Storage) wrote:
1. That will cover the .shutdown function used by mptfc.c, mptspi.c,
and mptscsih.c, but mptsas.c uses mptsas_shutdown rather than
mptscsih_shutdown.  It doesn't call pci_disable_msi either.

Missed that; thanks.

2. mptscsih_suspend is another caller of mptscsih_shutdown
(although the latter does nothing right now).  This is done
before calling mpt_suspend, which writes to some chip registers
to disable interrupts before calling pci_disable_msi.  Adding a
pci_disable_msi call before those writes might not be safe.

Clearly more paths into this function than I investigated.

3. That mptscsih_suspend call chain will result in calling
pci_disable_msi twice, which might trigger this in
pci_disable_msi -> pci_msi_shutdown:
       BUG_ON(list_empty(&dev->msi_list));

Ah, but pci_disable_msi will not even invoke pci_msi_shutdown:

        if (!pci_msi_enable || !dev || !dev->msi_enabled)
	                return;

The same check is done in pci_msi_shutdown. If that check wasn't there,
every driver would hit that BUG_ON since most every other pci driver
disables their interrupts in their shutdown path before returning, and
then pci-driver calls it again! MPT appears to be the exception.
--
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