PCI: PCIe portdrv: Do not enable port device before setting up interrupts
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 13 Jan 2009 13:42:01 +0000 (14:42 +0100)
committerJesse Barnes <jbarnes@hobbes.lan>
Fri, 20 Mar 2009 02:29:22 +0000 (19:29 -0700)
The PCI Express port driver calls pci_enable_device() before setting
up interrupts, which is wrong, because if there is an interrupt pin
configured for the port, pci_enable_device() will likely set up an
interrupt link for it.  However, this shouldn't be done if either
MSI or MSI-X interrupt mode is chosen for the port.

The solution is to call pci_enable_device() after setting up
interrupts, because in that case the interrupt link won't be set up
if MSI or MSI-X are enabled.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/portdrv_core.c
drivers/pci/pcie/portdrv_pci.c

Simple merge
Simple merge