linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/portdrv: Fix regression introduced by commit 2dcfaf85
@ 2012-10-31  0:51 Taku Izumi
  2012-10-31  1:34 ` Yinghai Lu
  2012-11-01 12:53 ` Jiang Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Taku Izumi @ 2012-10-31  0:51 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, Jiang Liu, wangyijing; +Cc: Yinghai Lu


PCI/portdrv: Fix regression introduced by commit 2dcfaf85

After commit 2dcfaf85, hotplug slots for port devices 
w/o slot implementation come to be created.  
This patch fixes this problem.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
 drivers/pci/pcie/portdrv_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: pci/drivers/pci/pcie/portdrv_core.c
===================================================================
--- pci.orig/drivers/pci/pcie/portdrv_core.c
+++ pci/drivers/pci/pcie/portdrv_core.c
@@ -272,7 +272,8 @@ static int get_port_device_capability(st
 	}
 
 	/* 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;


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-05 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31  0:51 [PATCH] PCI/portdrv: Fix regression introduced by commit 2dcfaf85 Taku Izumi
2012-10-31  1:34 ` Yinghai Lu
2012-11-01 12:53 ` Jiang Liu
2012-11-05 22:08   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).