From: Taku Izumi <izumi.taku@jp.fujitsu.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Jiang Liu <jiang.liu@huawei.com>,
wangyijing@huawei.com
Cc: Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH] PCI/portdrv: Fix regression introduced by commit 2dcfaf85
Date: Wed, 31 Oct 2012 09:51:48 +0900 [thread overview]
Message-ID: <20121031095148.75dbb6e8.izumi.taku@jp.fujitsu.com> (raw)
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, ®32);
if (reg32 & PCI_EXP_SLTCAP_HPC) {
services |= PCIE_PORT_SERVICE_HP;
next reply other threads:[~2012-10-31 0:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 0:51 Taku Izumi [this message]
2012-10-31 1:34 ` [PATCH] PCI/portdrv: Fix regression introduced by commit 2dcfaf85 Yinghai Lu
2012-11-01 12:53 ` Jiang Liu
2012-11-05 22:08 ` Bjorn Helgaas
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=20121031095148.75dbb6e8.izumi.taku@jp.fujitsu.com \
--to=izumi.taku@jp.fujitsu.com \
--cc=bhelgaas@google.com \
--cc=jiang.liu@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=wangyijing@huawei.com \
--cc=yinghai@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).