diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/portdrv.h | 12 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_core.c | 16 |
2 files changed, 26 insertions, 2 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index bd00a01aef14..eea2ca2375e6 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h | |||
@@ -34,6 +34,18 @@ struct pci_dev; | |||
34 | 34 | ||
35 | extern void pcie_clear_root_pme_status(struct pci_dev *dev); | 35 | extern void pcie_clear_root_pme_status(struct pci_dev *dev); |
36 | 36 | ||
37 | #ifdef CONFIG_HOTPLUG_PCI_PCIE | ||
38 | extern bool pciehp_msi_disabled; | ||
39 | |||
40 | static inline bool pciehp_no_msi(void) | ||
41 | { | ||
42 | return pciehp_msi_disabled; | ||
43 | } | ||
44 | |||
45 | #else /* !CONFIG_HOTPLUG_PCI_PCIE */ | ||
46 | static inline bool pciehp_no_msi(void) { return false; } | ||
47 | #endif /* !CONFIG_HOTPLUG_PCI_PCIE */ | ||
48 | |||
37 | #ifdef CONFIG_PCIE_PME | 49 | #ifdef CONFIG_PCIE_PME |
38 | extern bool pcie_pme_msi_disabled; | 50 | extern bool pcie_pme_msi_disabled; |
39 | 51 | ||
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 595654a1a6a6..2f589a54f9bd 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
@@ -19,6 +19,17 @@ | |||
19 | #include "../pci.h" | 19 | #include "../pci.h" |
20 | #include "portdrv.h" | 20 | #include "portdrv.h" |
21 | 21 | ||
22 | bool pciehp_msi_disabled; | ||
23 | |||
24 | static int __init pciehp_setup(char *str) | ||
25 | { | ||
26 | if (!strncmp(str, "nomsi", 5)) | ||
27 | pciehp_msi_disabled = true; | ||
28 | |||
29 | return 1; | ||
30 | } | ||
31 | __setup("pcie_hp=", pciehp_setup); | ||
32 | |||
22 | /** | 33 | /** |
23 | * release_pcie_device - free PCI Express port service device structure | 34 | * release_pcie_device - free PCI Express port service device structure |
24 | * @dev: Port service device to release | 35 | * @dev: Port service device to release |
@@ -189,8 +200,9 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask) | |||
189 | { | 200 | { |
190 | int i, irq = -1; | 201 | int i, irq = -1; |
191 | 202 | ||
192 | /* We have to use INTx if MSI cannot be used for PCIe PME. */ | 203 | /* We have to use INTx if MSI cannot be used for PCIe PME or pciehp. */ |
193 | if ((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) { | 204 | if (((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) || |
205 | ((mask & PCIE_PORT_SERVICE_HP) && pciehp_no_msi())) { | ||
194 | if (dev->pin) | 206 | if (dev->pin) |
195 | irq = dev->irq; | 207 | irq = dev->irq; |
196 | goto no_msi; | 208 | goto no_msi; |