From: 松本博郎 <matsumoto.hiroo@jp.fujitsu.com>
To: jbarnes@virtuousgeek.org
Cc: linux-pci@vger.kernel.org
Subject: [RFC] pciehp: Add archdata setting
Date: Mon, 02 Apr 2012 16:42:03 +0900 [thread overview]
Message-ID: <4F79584B.2010301@jp.fujitsu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
Hi
I'm trying to use pciehp on powerpc platform.
I set e1000e card to PCI Express bridge that has PCI Express HotPlug
Capability.
There is problem when poweron PCI Express HotPlug slot with pciehp.
e1000e driver needs dma_ops in struct dev_archdata, but archdata isn't
set (dma_ops is NULL) when probe from pciehp.
Then e1000e driver returns error as below.
-sh-3.2# echo 1 > /sys/bus/pci/slots/1/power
<snip>
[ 65.493662] pci 0000:03:00.0: BAR 2: set to [io
0xff7ee000-0xff7ee01f] (PCI address [0x1000-0x101f])
[ 65.502890] pcieport 0000:02:01.0: PCI bridge to [bus 03-03]
[ 65.508555] pcieport 0000:02:01.0: bridge window [io
0xff7ee000-0xff7eefff]
[ 65.515785] pcieport 0000:02:01.0: bridge window [mem
0xa0100000-0xa01fffff]
[ 65.523015] pcieport 0000:02:01.0: bridge window [mem
0xa0200000-0xa02fffff 64bit pref]
[ 65.531238] pci 0000:03:00.0: no hotplug settings from platform
[ 65.538361] e1000e 0000:03:00.0: Disabling ASPM L1
[ 65.543616] e1000e 0000:03:00.0: enabling device (0000 -> 0002)
[ 65.549876] e1000e 0000:03:00.0: No usable DMA configuration, aborting
[ 65.557194] e1000e: probe of 0000:03:00.0 failed with error -5
-sh-3.2# lspci
<snip>
0000:03:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit
Ethernet Controller (Copper) (rev 06)
<snip>
-sh-3.2# ifconfig -a
<snip> // There is no network interface for 82572EI
If archdata.dma_ops is NULL on x86 platform, e1000e will get dma_ops
without archdata.
So e1000e driver doesn't return error.
I think that archdata should be set before driver probe (e.g pciehp).
I tried to fix it (pciehp-add-archdata.patch), but I'm not good at PCI
driver..., so please give better way.
Regards.
Hiroo MATSUMOTO (FUJITSU COMPUTER TECHNOLOGIES LIMITED)
matsumoto.hiroo@jp.fujitsu.com
[-- Attachment #2: pciehp-add-archdata.patch --]
[-- Type: text/plain, Size: 475 bytes --]
Signed-off-by: Hiroo MATSUMOTO <matsumoto.hiroo@jp.fujitsu.com>
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c
index a4031df..a021fbc 100644
--- a/drivers/pci/hotplug/pciehp_pci.c
+++ b/drivers/pci/hotplug/pciehp_pci.c
@@ -89,6 +89,7 @@ int pciehp_configure_device(struct slot *p_slot)
pciehp_add_bridge(dev);
}
pci_dev_put(dev);
+ dev->dev.archdata = bridge->dev.archdata;
}
pci_assign_unassigned_bridge_resources(bridge);
next reply other threads:[~2012-04-02 7:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 7:42 松本博郎 [this message]
2012-04-02 14:13 ` [RFC] pciehp: Add archdata setting Bjorn Helgaas
2012-04-03 6:26 ` 松本博郎
2012-04-03 7:53 ` Kenji Kaneshige
2012-04-03 7:15 ` Kenji Kaneshige
2012-04-04 8:03 ` 松本博郎
2012-04-12 5:00 ` Hiroo Matsumoto
2012-04-12 13:12 ` Bjorn Helgaas
2012-04-12 23:59 ` Hiroo Matsumoto
2012-04-16 6:32 ` Hiroo Matsumoto
2012-04-23 17:21 ` Bjorn Helgaas
2012-04-26 10:00 ` Hiroo Matsumoto
2012-05-10 10:38 ` Hiroo Matsumoto
2012-05-10 12:09 ` Kenji Kaneshige
2012-05-15 23:20 ` Bjorn Helgaas
2012-05-23 1:33 ` Hiroo Matsumoto
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=4F79584B.2010301@jp.fujitsu.com \
--to=matsumoto.hiroo@jp.fujitsu.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-pci@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.