From: Yijing Wang <wangyijing@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>, Tony Luck <tony.luck@intel.com>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Hanjun Guo <guohanjun@huawei.com>, <jiang.liu@huawei.com>,
Yijing Wang <wangyijing@huawei.com>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Shengzhou Liu <Shengzhou.Liu@freescale.com>
Subject: [PATCH 1/2] PCI: decrease pci_dev->enable_cnt when no pcie capability found
Date: Mon, 1 Apr 2013 16:42:54 +0800 [thread overview]
Message-ID: <1364805775-12396-1-git-send-email-wangyijing@huawei.com> (raw)
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
next reply other threads:[~2013-04-01 8:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 8:42 Yijing Wang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364805775-12396-1-git-send-email-wangyijing@huawei.com \
--to=wangyijing@huawei.com \
--cc=Shengzhou.Liu@freescale.com \
--cc=bhelgaas@google.com \
--cc=guohanjun@huawei.com \
--cc=jiang.liu@huawei.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®