PCI: Fail MSI/MSI-X initialization if device is not in PCI_D0
authorYijing Wang <wangyijing@huawei.com>
Thu, 10 Oct 2013 12:58:11 +0000 (20:58 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 29 Oct 2013 19:30:52 +0000 (13:30 -0600)
Currently, pci_enable_msi() and pci_enable_msix() return success even if
the device power state is not D0.  However, we don't write the MSI message
to the device registers, and the registers will never be updated later.

This patch makes pci_enable_msi() and pci_enable_msix() return an error
instead.

[bhelgaas: changelog]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

No differences found