summaryrefslogtreecommitdiff
path: root/drivers/pci/pcie/portdrv_core.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-08-21 03:51:44 +0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-08-25 00:43:15 +0400
commit79dd9182db2072d63ccf160bb9a3463b1c952723 (patch)
tree89069b3803a4e07924c6fd4414bbd2a771a432e9 /drivers/pci/pcie/portdrv_core.c
parentf1a7bfaf6bb9cb195577e674c0ab2fd0a55d9014 (diff)
downloadlinux-79dd9182db2072d63ccf160bb9a3463b1c952723.tar.xz
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_core.c')
-rw-r--r--drivers/pci/pcie/portdrv_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index e73effbe402c..2bf2fe510e15 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -494,6 +494,9 @@ static void pcie_port_shutdown_service(struct device *dev) {}
*/
int pcie_port_service_register(struct pcie_port_service_driver *new)
{
+ if (pcie_ports_disabled)
+ return -ENODEV;
+
new->driver.name = (char *)new->name;
new->driver.bus = &pcie_port_bus_type;
new->driver.probe = pcie_port_probe_service;