[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1364805775-12396-1-git-send-email-wangyijing@huawei.com>
Date: Mon, 1 Apr 2013 16:42:54 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Tony Luck <tony.luck@...el.com>
CC: <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Hanjun Guo <guohanjun@...wei.com>, <jiang.liu@...wei.com>,
Yijing Wang <wangyijing@...wei.com>,
Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
Shengzhou Liu <Shengzhou.Liu@...escale.com>
Subject: [PATCH 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found
We should decrease dev->enable_cnt when no pcie port capability
found for balance.
Signed-off-by: Yijing Wang <wangyijing@...wei.com>
Cc: Jiang Liu <jiang.liu@...wei.com>
Cc: Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
Cc: Shengzhou Liu <Shengzhou.Liu@...escale.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists