summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTaku Izumi <izumi.taku@jp.fujitsu.com>2012-10-31 09:51:48 +0900
committerBjorn Helgaas <bhelgaas@google.com>2012-11-05 16:59:59 -0700
commitff8e59bc4ec3f31789a47dce9b6fe44bd7bc5fcc (patch)
treee502e5301a0fe7475696851c435c2b887285169c /drivers
parent3cba8eedb757590455b03dfeaba15a5b32610339 (diff)
downloadlinux-ff8e59bc4ec3f31789a47dce9b6fe44bd7bc5fcc.tar.bz2
PCI/portdrv: Don't create hotplug slots unless port supports hotplug
Commit 2dcfaf85 mistakenly dropped the "flags & PCI_EXP_FLAGS_SLOT" test, so now we create hotplug slots even for PCIe port devices that don't support hotplug. This patch fixes this problem. [bhelgaas: changelog] Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Reviewed-by: Jiang Liu <jiang.liu@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pcie/portdrv_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index d03a7a39b2d8..ed129b414624 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -272,7 +272,8 @@ static int get_port_device_capability(struct pci_dev *dev)
}
/* Hot-Plug Capable */
- if (cap_mask & PCIE_PORT_SERVICE_HP) {
+ if ((cap_mask & PCIE_PORT_SERVICE_HP) &&
+ dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT) {
pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, &reg32);
if (reg32 & PCI_EXP_SLTCAP_HPC) {
services |= PCIE_PORT_SERVICE_HP;