public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found
@ 2013-04-01  8:42 Yijing Wang
  2013-04-01  8:42 ` [PATCH 2/2] PCI/IA64: fix pci_dev->enable_cnt balance when doing pci hotplug Yijing Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Yijing Wang @ 2013-04-01  8:42 UTC (permalink / raw)
  To: Bjorn Helgaas, Tony Luck
  Cc: linux-pci, linux-kernel, Hanjun Guo, jiang.liu, Yijing Wang,
	Kenji Kaneshige, Shengzhou Liu

We should decrease dev->enable_cnt when no pcie port capability
found for balance.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 drivers/pci/pcie/portdrv_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 31063ac..dd95d6f 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -369,8 +369,10 @@ int pcie_port_device_register(struct pci_dev *dev)
 
 	/* Get and check PCI Express port services */
 	capabilities = get_port_device_capability(dev);
-	if (!capabilities)
+	if (!capabilities) {
+		pci_disable_device(dev);
 		return 0;
+	}
 
 	pci_set_master(dev);
 	/*
-- 
1.7.1



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

end of thread, other threads:[~2013-04-15  2:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-01  8:42 [PATCH 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found Yijing Wang
2013-04-01  8:42 ` [PATCH 2/2] PCI/IA64: fix pci_dev->enable_cnt balance when doing pci hotplug Yijing Wang
2013-04-01 22:23   ` Luck, Tony
2013-04-02  2:56     ` Yijing Wang
2013-04-02 16:49       ` Luck, Tony
2013-04-12 23:23   ` Bjorn Helgaas
2013-04-15  2:34     ` Yijing Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox