diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-08-20 19:51:44 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-08-24 16:43:15 -0400 |
commit | 79dd9182db2072d63ccf160bb9a3463b1c952723 (patch) | |
tree | 89069b3803a4e07924c6fd4414bbd2a771a432e9 /drivers/pci/pcie/portdrv_pci.c | |
parent | f1a7bfaf6bb9cb195577e674c0ab2fd0a55d9014 (diff) |
PCI: PCIe: Introduce commad line switch for disabling port services
Introduce kernel command line switch pcie_ports= allowing one to
disable all of the native PCIe port services, so that PCIe ports
are treated like PCI-to-PCI bridges.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/portdrv_pci.c')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 3debed25e46..a04392da6ce 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -29,6 +29,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR); | |||
29 | MODULE_DESCRIPTION(DRIVER_DESC); | 29 | MODULE_DESCRIPTION(DRIVER_DESC); |
30 | MODULE_LICENSE("GPL"); | 30 | MODULE_LICENSE("GPL"); |
31 | 31 | ||
32 | /* If this switch is set, PCIe port native services should not be enabled. */ | ||
33 | bool pcie_ports_disabled; | ||
34 | |||
35 | static int __init pcie_port_setup(char *str) | ||
36 | { | ||
37 | if (!strncmp(str, "compat", 6)) | ||
38 | pcie_ports_disabled = true; | ||
39 | |||
40 | return 1; | ||
41 | } | ||
42 | __setup("pcie_ports=", pcie_port_setup); | ||
43 | |||
32 | /* global data */ | 44 | /* global data */ |
33 | 45 | ||
34 | static int pcie_portdrv_restore_config(struct pci_dev *dev) | 46 | static int pcie_portdrv_restore_config(struct pci_dev *dev) |
@@ -301,6 +313,9 @@ static int __init pcie_portdrv_init(void) | |||
301 | { | 313 | { |
302 | int retval; | 314 | int retval; |
303 | 315 | ||
316 | if (pcie_ports_disabled) | ||
317 | return -EACCES; | ||
318 | |||
304 | dmi_check_system(pcie_portdrv_dmi_table); | 319 | dmi_check_system(pcie_portdrv_dmi_table); |
305 | 320 | ||
306 | retval = pcie_port_bus_register(); | 321 | retval = pcie_port_bus_register(); |