* [PATCH 0/2] pciehp/shpchp prevent duplicate slot names
@ 2008-08-21 21:11 Alex Chiang
2008-08-21 21:13 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alex Chiang @ 2008-08-21 21:11 UTC (permalink / raw)
To: jbarnes; +Cc: kaneshige.kenji, linux-pci, linux-kernel
Hi Jesse,
Here are patches:
[PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M...
[PATCH 2/2] shpchp: Rename duplicate slot name N as N-1, N-2, N-M...
Against Linus's 2.6.27-rc4.
As noted in the changelogs, these are temporary patches, meant as
placeholders until I complete the longer patch series that allows
the PCI core to manage the slot names on behalf of the drivers.
The longer patch series will keep the same behavior that these
temp patches implement, so that's goodness.
These patches have already been tested and acked by Kenji-san.
http://article.gmane.org/gmane.linux.kernel/714583
http://article.gmane.org/gmane.linux.kernel/714582
So I think you can add his sign-offs too.
Thanks,
/ac
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 21:11 [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Alex Chiang @ 2008-08-21 21:13 ` Alex Chiang 2008-08-21 21:13 ` [PATCH 2/2] shpchp: " Alex Chiang 2008-08-21 22:16 ` [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Jesse Barnes 2 siblings, 0 replies; 6+ messages in thread From: Alex Chiang @ 2008-08-21 21:13 UTC (permalink / raw) To: jbarnes, kaneshige.kenji, linux-pci, linux-kernel Commit 3800345f723fd130d50434d4717b99d4a9f383c8 (pciehp: fix slot name) introduces the pciehp_slot_with_bus module parameter, which was intended to help work around broken firmware that assigns the same name to multiple slots. Commit 9e4f2e8d4ddb04ad16a3828cd9a369a5a5287009 (pciehp: add message about pciehp_slot_with_bus option) tells the user to use the above parameter in the event of a name collision. This approach is sub-optimal because it requires too much work from the user. Instead, let's rename the slot on behalf of the user. If firmware assigns the name N to multiple slots, then: The first registered slot is assigned N The second registered slot is assigned N-1 The third registered slot is assigned N-2 The Mth registered slot becomes N-M In the event we overflow the slot->name parameter, we report an error to the user. This is a temporary fix until the entire PCI core can be reworked such that individual drivers no longer have to manage their own slot names. Signed-off-by: Alex Chiang <achiang@hp.com> --- drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_core.c | 21 ++++++++++++++------- drivers/pci/hotplug/pciehp_hpc.c | 11 +---------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index e3a1e7e..9e6cec6 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -43,7 +43,6 @@ extern int pciehp_poll_mode; extern int pciehp_poll_time; extern int pciehp_debug; extern int pciehp_force; -extern int pciehp_slot_with_bus; extern struct workqueue_struct *pciehp_wq; #define dbg(format, arg...) \ diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 3677495..4fd5355 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -41,7 +41,6 @@ int pciehp_debug; int pciehp_poll_mode; int pciehp_poll_time; int pciehp_force; -int pciehp_slot_with_bus; struct workqueue_struct *pciehp_wq; #define DRIVER_VERSION "0.4" @@ -56,12 +55,10 @@ module_param(pciehp_debug, bool, 0644); module_param(pciehp_poll_mode, bool, 0644); module_param(pciehp_poll_time, int, 0644); module_param(pciehp_force, bool, 0644); -module_param(pciehp_slot_with_bus, bool, 0644); MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing"); -MODULE_PARM_DESC(pciehp_slot_with_bus, "Use bus number in the slot name"); #define PCIE_MODULE_NAME "pciehp" @@ -194,6 +191,7 @@ static int init_slots(struct controller *ctrl) struct slot *slot; struct hotplug_slot *hotplug_slot; struct hotplug_slot_info *info; + int len, dup = 1; int retval = -ENOMEM; list_for_each_entry(slot, &ctrl->slot_list, slot_list) { @@ -220,15 +218,24 @@ static int init_slots(struct controller *ctrl) dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x " "slot_device_offset=%x\n", slot->bus, slot->device, slot->hp_slot, slot->number, ctrl->slot_device_offset); +duplicate_name: retval = pci_hp_register(hotplug_slot, ctrl->pci_dev->subordinate, slot->device); if (retval) { + /* + * If slot N already exists, we'll try to create + * slot N-1, N-2 ... N-M, until we overflow. + */ + if (retval == -EEXIST) { + len = snprintf(slot->name, SLOT_NAME_SIZE, + "%d-%d", slot->number, dup++); + if (len < SLOT_NAME_SIZE) + goto duplicate_name; + else + err("duplicate slot name overflow\n"); + } err("pci_hp_register failed with error %d\n", retval); - if (retval == -EEXIST) - err("Failed to register slot because of name " - "collision. Try \'pciehp_slot_with_bus\' " - "module option.\n"); goto error_info; } /* create additional sysfs entries */ diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index ad27e9e..ab31f5b 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -1030,15 +1030,6 @@ static void pcie_shutdown_notification(struct controller *ctrl) pciehp_free_irq(ctrl); } -static void make_slot_name(struct slot *slot) -{ - if (pciehp_slot_with_bus) - snprintf(slot->name, SLOT_NAME_SIZE, "%04d_%04d", - slot->bus, slot->number); - else - snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); -} - static int pcie_init_slot(struct controller *ctrl) { struct slot *slot; @@ -1053,7 +1044,7 @@ static int pcie_init_slot(struct controller *ctrl) slot->device = ctrl->slot_device_offset + slot->hp_slot; slot->hpc_ops = ctrl->hpc_ops; slot->number = ctrl->first_slot; - make_slot_name(slot); + snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); mutex_init(&slot->lock); INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); list_add(&slot->slot_list, &ctrl->slot_list); -- 1.6.0.rc0.g95f8 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] shpchp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 21:11 [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Alex Chiang 2008-08-21 21:13 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang @ 2008-08-21 21:13 ` Alex Chiang 2008-08-21 22:16 ` [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Jesse Barnes 2 siblings, 0 replies; 6+ messages in thread From: Alex Chiang @ 2008-08-21 21:13 UTC (permalink / raw) To: jbarnes, kaneshige.kenji, linux-pci, linux-kernel Commit ef0ff95f136f0f2d035667af5d18b824609de320 (shpchp: fix slot name) introduces the shpchp_slot_with_bus module parameter, which was intended to help work around broken firmware that assigns the same name to multiple slots. Commit b3bd307c628af2f0a581c42d5d7e4bcdbbf64b6a (shpchp: add message about shpchp_slot_with_bus option) tells the user to use the above parameter in the event of a name collision. This approach is sub-optimal because it requires too much work from the user. Instead, let's rename the slot on behalf of the user. If firmware assigns the name N to multiple slots, then: The first registered slot is assigned N The second registered slot is assigned N-1 The third registered slot is assigned N-2 The Mth registered slot becomes N-M In the event we overflow the slot->name parameter, we report an error to the user. This is a temporary fix until the entire PCI core can be reworked such that individual drivers no longer have to manage their own slot names. Signed-off-by: Alex Chiang <achiang@hp.com> --- drivers/pci/hotplug/shpchp_core.c | 34 +++++++++++++++------------------- 1 files changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index a8cbd03..cc38615 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c @@ -39,7 +39,6 @@ int shpchp_debug; int shpchp_poll_mode; int shpchp_poll_time; -static int shpchp_slot_with_bus; struct workqueue_struct *shpchp_wq; #define DRIVER_VERSION "0.4" @@ -53,11 +52,9 @@ MODULE_LICENSE("GPL"); module_param(shpchp_debug, bool, 0644); module_param(shpchp_poll_mode, bool, 0644); module_param(shpchp_poll_time, int, 0644); -module_param(shpchp_slot_with_bus, bool, 0644); MODULE_PARM_DESC(shpchp_debug, "Debugging mode enabled or not"); MODULE_PARM_DESC(shpchp_poll_mode, "Using polling mechanism for hot-plug events or not"); MODULE_PARM_DESC(shpchp_poll_time, "Polling mechanism frequency, in seconds"); -MODULE_PARM_DESC(shpchp_slot_with_bus, "Use bus number in the slot name"); #define SHPC_MODULE_NAME "shpchp" @@ -99,23 +96,13 @@ static void release_slot(struct hotplug_slot *hotplug_slot) kfree(slot); } -static void make_slot_name(struct slot *slot) -{ - if (shpchp_slot_with_bus) - snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%04d_%04d", - slot->bus, slot->number); - else - snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%d", - slot->number); -} - static int init_slots(struct controller *ctrl) { struct slot *slot; struct hotplug_slot *hotplug_slot; struct hotplug_slot_info *info; int retval = -ENOMEM; - int i; + int i, len, dup = 1; for (i = 0; i < ctrl->num_slots; i++) { slot = kzalloc(sizeof(*slot), GFP_KERNEL); @@ -146,7 +133,7 @@ static int init_slots(struct controller *ctrl) /* register this slot with the hotplug pci core */ hotplug_slot->private = slot; hotplug_slot->release = &release_slot; - make_slot_name(slot); + snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); hotplug_slot->ops = &shpchp_hotplug_slot_ops; get_power_status(hotplug_slot, &info->power_status); @@ -157,14 +144,23 @@ static int init_slots(struct controller *ctrl) dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x " "slot_device_offset=%x\n", slot->bus, slot->device, slot->hp_slot, slot->number, ctrl->slot_device_offset); +duplicate_name: retval = pci_hp_register(slot->hotplug_slot, ctrl->pci_dev->subordinate, slot->device); if (retval) { + /* + * If slot N already exists, we'll try to create + * slot N-1, N-2 ... N-M, until we overflow. + */ + if (retval == -EEXIST) { + len = snprintf(slot->name, SLOT_NAME_SIZE, + "%d-%d", slot->number, dup++); + if (len < SLOT_NAME_SIZE) + goto duplicate_name; + else + err("duplicate slot name overflow\n"); + } err("pci_hp_register failed with error %d\n", retval); - if (retval == -EEXIST) - err("Failed to register slot because of name " - "collision. Try \'shpchp_slot_with_bus\' " - "module option.\n"); goto error_info; } -- 1.6.0.rc0.g95f8 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] pciehp/shpchp prevent duplicate slot names 2008-08-21 21:11 [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Alex Chiang 2008-08-21 21:13 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang 2008-08-21 21:13 ` [PATCH 2/2] shpchp: " Alex Chiang @ 2008-08-21 22:16 ` Jesse Barnes 2 siblings, 0 replies; 6+ messages in thread From: Jesse Barnes @ 2008-08-21 22:16 UTC (permalink / raw) To: Alex Chiang; +Cc: kaneshige.kenji, linux-pci, linux-kernel On Thursday, August 21, 2008 2:11 pm Alex Chiang wrote: > Hi Jesse, > > Here are patches: > > [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M... > [PATCH 2/2] shpchp: Rename duplicate slot name N as N-1, N-2, N-M... > > Against Linus's 2.6.27-rc4. > > As noted in the changelogs, these are temporary patches, meant as > placeholders until I complete the longer patch series that allows > the PCI core to manage the slot names on behalf of the drivers. > > The longer patch series will keep the same behavior that these > temp patches implement, so that's goodness. > > These patches have already been tested and acked by Kenji-san. > > http://article.gmane.org/gmane.linux.kernel/714583 > http://article.gmane.org/gmane.linux.kernel/714582 > > So I think you can add his sign-offs too. Excellent, thanks Alex & Kenji-san. I applied this to my for-linus branch. I'll have Linus pull it soon. Thanks, -- Jesse Barnes, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus
@ 2008-07-24 21:07 Jesse Barnes
2008-07-24 21:51 ` Pierre Ossman
0 siblings, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2008-07-24 21:07 UTC (permalink / raw)
To: Pierre Ossman; +Cc: Kenji Kaneshige, LKML, linux-pci
On Thursday, July 24, 2008 1:39 pm Pierre Ossman wrote:
> On Thu, 24 Jul 2008 21:38:32 +0900
>
> Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:
> > Hi Pierre,
> > (Added linux-pci to CC)
> >
> > Pierre Ossman wrote:
> > > Somewhere post 2.6.26, pciehp started whining about not being able to
> > > claim the slot and error code -17. It suggested adding
> > > "pciehp_slot_with_bus", which actually helped. Still, having a kernel
> > > parameter should just be a temporary fix.
> >
> > The "pciehp_slot_with_bus" option is a workaround for the platforms
> > that assign the same physical slot number to multiple slots. If your
> > system has PCI chassis and it supports Chassis Number registers,
> > maybe one of the solution is using chassis number + slot number as a
> > slot name. But I don't have any idea other than "pciehp_slot_with_bus"
> > if your system doesn't support chassis number.
>
> The what now? :)
>
> This is a laptop with a single expressport that worked fine up until
> this merge window. What changed and why is it no longer possible to
> support this hardware without a kernel parameter?
Yeah we're being a bit more careful about registering hotplug slots these
days. The fact that you got a conflict message indicates that more than one
driver is trying to bind to that PCIe port and handle hotplug for it. I
guess acpiphp must already be loaded?
Jesse
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 21:07 post 2.6.26 requires pciehp_slot_with_bus Jesse Barnes @ 2008-07-24 21:51 ` Pierre Ossman 2008-07-24 22:06 ` Jesse Barnes 0 siblings, 1 reply; 6+ messages in thread From: Pierre Ossman @ 2008-07-24 21:51 UTC (permalink / raw) To: Jesse Barnes; +Cc: Kenji Kaneshige, LKML, linux-pci [-- Attachment #1: Type: text/plain, Size: 1324 bytes --] On Thu, 24 Jul 2008 14:07:18 -0700 Jesse Barnes <jbarnes@virtuousgeek.org> wrote: > On Thursday, July 24, 2008 1:39 pm Pierre Ossman wrote: > > > > This is a laptop with a single expressport that worked fine up until > > this merge window. What changed and why is it no longer possible to > > support this hardware without a kernel parameter? > > Yeah we're being a bit more careful about registering hotplug slots these > days. The fact that you got a conflict message indicates that more than one > driver is trying to bind to that PCIe port and handle hotplug for it. I > guess acpiphp must already be loaded? > Nope. Only pciehp is builtin, and acpiphp is not loaded. Anything non-hotplug related that can block stuff? Anyway, the port seems to work even with that warning present though (sorry for not testing that properly earlier). Stray warnings is still not pleasant though, so I can do some more testing if you have some ideas. Rgds -- -- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 21:51 ` Pierre Ossman @ 2008-07-24 22:06 ` Jesse Barnes 2008-07-24 22:29 ` Alex Chiang 0 siblings, 1 reply; 6+ messages in thread From: Jesse Barnes @ 2008-07-24 22:06 UTC (permalink / raw) To: Pierre Ossman; +Cc: Kenji Kaneshige, LKML, linux-pci On Thursday, July 24, 2008 2:51 pm Pierre Ossman wrote: > On Thu, 24 Jul 2008 14:07:18 -0700 > > Jesse Barnes <jbarnes@virtuousgeek.org> wrote: > > On Thursday, July 24, 2008 1:39 pm Pierre Ossman wrote: > > > This is a laptop with a single expressport that worked fine up until > > > this merge window. What changed and why is it no longer possible to > > > support this hardware without a kernel parameter? > > > > Yeah we're being a bit more careful about registering hotplug slots these > > days. The fact that you got a conflict message indicates that more than > > one driver is trying to bind to that PCIe port and handle hotplug for it. > > I guess acpiphp must already be loaded? > > Nope. Only pciehp is builtin, and acpiphp is not loaded. Anything > non-hotplug related that can block stuff? Theoretically only one of the other hotplug drivers could claim the slot (e.g. acpi, cpci, cpqhp, fakephp etc.). You could put a dump_stack() or something into drivers/pci/hotplug/pci_hotplug_core.c:pci_hp_register to see if we're getting multiple callers on the same slot for some reason... Maybe the pciehp driver itself is trying to register the same slot twice? > Anyway, the port seems to work even with that warning present though > (sorry for not testing that properly earlier). Stray warnings is still > not pleasant though, so I can do some more testing if you have some > ideas. Thanks. Yeah we don't want to scare people or break existing setups. Jesse ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 22:06 ` Jesse Barnes @ 2008-07-24 22:29 ` Alex Chiang 2008-07-24 22:49 ` Pierre Ossman 0 siblings, 1 reply; 6+ messages in thread From: Alex Chiang @ 2008-07-24 22:29 UTC (permalink / raw) To: Jesse Barnes; +Cc: Pierre Ossman, Kenji Kaneshige, LKML, linux-pci * Jesse Barnes <jbarnes@virtuousgeek.org>: > On Thursday, July 24, 2008 2:51 pm Pierre Ossman wrote: > > On Thu, 24 Jul 2008 14:07:18 -0700 > > > > Jesse Barnes <jbarnes@virtuousgeek.org> wrote: > > > On Thursday, July 24, 2008 1:39 pm Pierre Ossman wrote: > > > > This is a laptop with a single expressport that worked > > > > fine up until this merge window. What changed and why is > > > > it no longer possible to support this hardware without a > > > > kernel parameter? > > > > > > Yeah we're being a bit more careful about registering > > > hotplug slots these days. The fact that you got a conflict > > > message indicates that more than one driver is trying to > > > bind to that PCIe port and handle hotplug for it. I guess > > > acpiphp must already be loaded? > > > > Nope. Only pciehp is builtin, and acpiphp is not loaded. > > Anything non-hotplug related that can block stuff? > > Theoretically only one of the other hotplug drivers could claim > the slot (e.g. acpi, cpci, cpqhp, fakephp etc.). You could > put a dump_stack() or something into > drivers/pci/hotplug/pci_hotplug_core.c:pci_hp_register to see > if we're getting multiple callers on the same slot for some > reason... Maybe the pciehp driver itself is trying to register > the same slot twice? This is a good idea. Any chance you could get that debug info for us, Pierre? Thanks. /ac ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 22:29 ` Alex Chiang @ 2008-07-24 22:49 ` Pierre Ossman 2008-07-24 23:08 ` Alex Chiang 0 siblings, 1 reply; 6+ messages in thread From: Pierre Ossman @ 2008-07-24 22:49 UTC (permalink / raw) To: Alex Chiang; +Cc: Jesse Barnes, Kenji Kaneshige, LKML, linux-pci [-- Attachment #1: Type: text/plain, Size: 15387 bytes --] On Thu, 24 Jul 2008 16:29:14 -0600 Alex Chiang <achiang@hp.com> wrote: > * Jesse Barnes <jbarnes@virtuousgeek.org>: > > > > Theoretically only one of the other hotplug drivers could claim > > the slot (e.g. acpi, cpci, cpqhp, fakephp etc.). You could > > put a dump_stack() or something into > > drivers/pci/hotplug/pci_hotplug_core.c:pci_hp_register to see > > if we're getting multiple callers on the same slot for some > > reason... Maybe the pciehp driver itself is trying to register > > the same slot twice? > > This is a good idea. > > Any chance you could get that debug info for us, Pierre? > I aim to please. Following is the relevant lines from my bootup with a dump_stack() right at the beginning of pci_hp_register(): [ 1.247459] pcieport-driver 0000:00:01.0: found MSI capability [ 1.247523] pci_express 0000:00:01.0:pcie00: allocate port service [ 1.247632] pci_express 0000:00:01.0:pcie02: allocate port service [ 1.247741] pci_express 0000:00:01.0:pcie03: allocate port service [ 1.248010] PCI: Setting latency timer of device 0000:00:1c.0 to 64 [ 1.248158] pcieport-driver 0000:00:1c.0: found MSI capability [ 1.248299] pci_express 0000:00:1c.0:pcie00: allocate port service [ 1.248415] pci_express 0000:00:1c.0:pcie02: allocate port service [ 1.248524] pci_express 0000:00:1c.0:pcie03: allocate port service [ 1.248873] PCI: Setting latency timer of device 0000:00:1c.1 to 64 [ 1.249020] pcieport-driver 0000:00:1c.1: found MSI capability [ 1.249162] pci_express 0000:00:1c.1:pcie00: allocate port service [ 1.249270] pci_express 0000:00:1c.1:pcie02: allocate port service [ 1.249379] pci_express 0000:00:1c.1:pcie03: allocate port service [ 1.249708] PCI: Setting latency timer of device 0000:00:1c.2 to 64 [ 1.249855] pcieport-driver 0000:00:1c.2: found MSI capability [ 1.249995] pci_express 0000:00:1c.2:pcie00: allocate port service [ 1.250102] pci_express 0000:00:1c.2:pcie02: allocate port service [ 1.250211] pci_express 0000:00:1c.2:pcie03: allocate port service [ 1.250531] PCI: Setting latency timer of device 0000:00:1c.3 to 64 [ 1.250679] pcieport-driver 0000:00:1c.3: found MSI capability [ 1.250819] pci_express 0000:00:1c.3:pcie00: allocate port service [ 1.250927] pci_express 0000:00:1c.3:pcie02: allocate port service [ 1.251035] pci_express 0000:00:1c.3:pcie03: allocate port service [ 1.251361] PCI: Setting latency timer of device 0000:00:1c.4 to 64 [ 1.251508] pcieport-driver 0000:00:1c.4: found MSI capability [ 1.251649] pci_express 0000:00:1c.4:pcie00: allocate port service [ 1.251762] pci_express 0000:00:1c.4:pcie02: allocate port service [ 1.251894] pci_express 0000:00:1c.4:pcie03: allocate port service [ 1.252429] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 1.253405] pciehp: HPC vendor_id 8086 device_id 2a01 ss_vid 0 ss_did 0 [ 1.253453] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.253460] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.253475] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.253485] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 [ 1.253494] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.253502] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 [ 1.253513] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 [ 1.253523] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.253531] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.253540] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.253550] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.253557] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.253569] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.253578] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.253585] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.253593] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.253600] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.253608] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.253615] [<c059f8be>] driver_register+0x6e/0x150 [ 1.253622] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.253630] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.253638] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.253648] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.253657] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.253666] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.253676] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.253685] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.253695] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.253704] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.253712] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.253720] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.253728] ======================= [ 1.253841] hpdriver 0000:00:01.0:pcie02: service driver hpdriver loaded [ 1.254648] pciehp: HPC vendor_id 8086 device_id 283f ss_vid 0 ss_did 0 [ 1.254730] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.254735] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.254744] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.254754] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 [ 1.254763] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.254771] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 [ 1.254780] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 [ 1.254789] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.254797] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.254806] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.254814] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.254821] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.254830] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.254838] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.254845] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.254853] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.254859] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.254867] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.254874] [<c059f8be>] driver_register+0x6e/0x150 [ 1.254881] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.254889] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.254897] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.254905] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.254914] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.254922] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.254930] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.254939] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.254948] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.254956] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.254964] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.254972] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.254980] ======================= [ 1.255097] hpdriver 0000:00:1c.0:pcie02: service driver hpdriver loaded [ 1.255900] pciehp: HPC vendor_id 8086 device_id 2841 ss_vid 0 ss_did 0 [ 1.255989] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.255994] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.256004] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.256013] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 [ 1.256023] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.256030] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 [ 1.256040] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 [ 1.256049] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.256057] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.256066] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.256074] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.256082] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.256092] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.256100] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.256107] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.256114] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.256121] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.256129] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.256136] [<c059f8be>] driver_register+0x6e/0x150 [ 1.256143] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.256151] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.256159] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.256167] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.256176] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.256184] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.256192] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.256201] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.256209] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.256218] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.256226] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.256234] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.256242] ======================= [ 1.256355] hpdriver 0000:00:1c.1:pcie02: service driver hpdriver loaded [ 1.257191] pciehp: HPC vendor_id 8086 device_id 2843 ss_vid 0 ss_did 0 [ 1.257273] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.257278] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.257287] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.257297] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 [ 1.257306] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.257313] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 [ 1.257323] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 [ 1.257332] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.257340] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.257349] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.257358] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.257365] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.257374] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.257383] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.257390] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.257397] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.257403] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.257411] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.257419] [<c059f8be>] driver_register+0x6e/0x150 [ 1.257426] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.257434] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.257442] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.257450] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.257459] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.257467] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.257475] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.257484] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.257492] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.257500] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.257509] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.257517] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.257524] ======================= [ 1.257639] hpdriver 0000:00:1c.2:pcie02: service driver hpdriver loaded [ 1.258440] pciehp: HPC vendor_id 8086 device_id 2845 ss_vid 0 ss_did 0 [ 1.258522] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.258527] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.258537] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.258546] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 [ 1.258556] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.258564] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 [ 1.258573] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 [ 1.258583] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.258591] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.258600] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.258609] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.258616] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.258626] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.258634] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.258642] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.258649] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.258656] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.258665] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.258672] [<c059f8be>] driver_register+0x6e/0x150 [ 1.258679] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.258687] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.258695] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.258703] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.258712] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.258719] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.258728] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.258737] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.258745] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.258753] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.258761] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.258769] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.258777] ======================= [ 1.258893] hpdriver 0000:00:1c.3:pcie02: service driver hpdriver loaded [ 1.259701] pciehp: HPC vendor_id 8086 device_id 2847 ss_vid 0 ss_did 0 [ 1.259787] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.259791] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.259801] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.259810] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 [ 1.259819] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.259827] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 [ 1.259836] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 [ 1.259845] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.259853] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.259862] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.259870] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.259877] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.259886] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.259894] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.259901] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.259908] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.259915] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.259923] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.259930] [<c059f8be>] driver_register+0x6e/0x150 [ 1.259937] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.259945] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.259954] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.259962] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.259971] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.259978] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.259987] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.259996] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.260004] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.260012] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.260020] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.260028] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.260036] ======================= [ 1.260041] pciehp: pci_hp_register failed with error -17 [ 1.260176] pciehp: Failed to register slot because of name collision. Try 'pciehp_slot_with_bus' module option. [ 1.260318] pciehp: pciehp: slot initialization failed [ 1.260576] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 -- -- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 22:49 ` Pierre Ossman @ 2008-07-24 23:08 ` Alex Chiang 2008-07-24 23:29 ` Pierre Ossman 0 siblings, 1 reply; 6+ messages in thread From: Alex Chiang @ 2008-07-24 23:08 UTC (permalink / raw) To: Pierre Ossman; +Cc: Jesse Barnes, Kenji Kaneshige, LKML, linux-pci * Pierre Ossman <drzeus-list@drzeus.cx>: > On Thu, 24 Jul 2008 16:29:14 -0600 > Alex Chiang <achiang@hp.com> wrote: > > > * Jesse Barnes <jbarnes@virtuousgeek.org>: > > > > > > Theoretically only one of the other hotplug drivers could claim > > > the slot (e.g. acpi, cpci, cpqhp, fakephp etc.). You could > > > put a dump_stack() or something into > > > drivers/pci/hotplug/pci_hotplug_core.c:pci_hp_register to see > > > if we're getting multiple callers on the same slot for some > > > reason... Maybe the pciehp driver itself is trying to register > > > the same slot twice? > > > > This is a good idea. > > > > Any chance you could get that debug info for us, Pierre? > > > > I aim to please. Following is the relevant lines from my bootup with a > dump_stack() right at the beginning of pci_hp_register(): Sorry for one more round-trip, but could you turn on debugging for pciehp as well? You're building it into your kernel right? I think you need to boot with pciehp_debug=1. Thanks. /ac > > [ 1.247459] pcieport-driver 0000:00:01.0: found MSI capability > [ 1.247523] pci_express 0000:00:01.0:pcie00: allocate port service > [ 1.247632] pci_express 0000:00:01.0:pcie02: allocate port service > [ 1.247741] pci_express 0000:00:01.0:pcie03: allocate port service > [ 1.248010] PCI: Setting latency timer of device 0000:00:1c.0 to 64 > [ 1.248158] pcieport-driver 0000:00:1c.0: found MSI capability > [ 1.248299] pci_express 0000:00:1c.0:pcie00: allocate port service > [ 1.248415] pci_express 0000:00:1c.0:pcie02: allocate port service > [ 1.248524] pci_express 0000:00:1c.0:pcie03: allocate port service > [ 1.248873] PCI: Setting latency timer of device 0000:00:1c.1 to 64 > [ 1.249020] pcieport-driver 0000:00:1c.1: found MSI capability > [ 1.249162] pci_express 0000:00:1c.1:pcie00: allocate port service > [ 1.249270] pci_express 0000:00:1c.1:pcie02: allocate port service > [ 1.249379] pci_express 0000:00:1c.1:pcie03: allocate port service > [ 1.249708] PCI: Setting latency timer of device 0000:00:1c.2 to 64 > [ 1.249855] pcieport-driver 0000:00:1c.2: found MSI capability > [ 1.249995] pci_express 0000:00:1c.2:pcie00: allocate port service > [ 1.250102] pci_express 0000:00:1c.2:pcie02: allocate port service > [ 1.250211] pci_express 0000:00:1c.2:pcie03: allocate port service > [ 1.250531] PCI: Setting latency timer of device 0000:00:1c.3 to 64 > [ 1.250679] pcieport-driver 0000:00:1c.3: found MSI capability > [ 1.250819] pci_express 0000:00:1c.3:pcie00: allocate port service > [ 1.250927] pci_express 0000:00:1c.3:pcie02: allocate port service > [ 1.251035] pci_express 0000:00:1c.3:pcie03: allocate port service > [ 1.251361] PCI: Setting latency timer of device 0000:00:1c.4 to 64 > [ 1.251508] pcieport-driver 0000:00:1c.4: found MSI capability > [ 1.251649] pci_express 0000:00:1c.4:pcie00: allocate port service > [ 1.251762] pci_express 0000:00:1c.4:pcie02: allocate port service > [ 1.251894] pci_express 0000:00:1c.4:pcie03: allocate port service > [ 1.252429] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 > [ 1.253405] pciehp: HPC vendor_id 8086 device_id 2a01 ss_vid 0 ss_did 0 > [ 1.253453] Pid: 1, comm: swapper Not tainted 2.6.26 #110 > [ 1.253460] [<c0544545>] pci_hp_register+0x25/0x4b0 > [ 1.253475] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 > [ 1.253485] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 > [ 1.253494] [<c054631b>] pciehp_probe+0x12b/0x3f0 > [ 1.253502] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 > [ 1.253513] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 > [ 1.253523] [<c0542110>] pcie_port_probe_service+0x50/0x90 > [ 1.253531] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 > [ 1.253540] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 > [ 1.253550] [<c059f557>] driver_probe_device+0x87/0x1a0 > [ 1.253557] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 > [ 1.253569] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 > [ 1.253578] [<c059f6e9>] __driver_attach+0x79/0x80 > [ 1.253585] [<c059ee23>] bus_for_each_dev+0x53/0x80 > [ 1.253593] [<c059f3ce>] driver_attach+0x1e/0x20 > [ 1.253600] [<c059f670>] ? __driver_attach+0x0/0x80 > [ 1.253608] [<c059e7e7>] bus_add_driver+0x1b7/0x230 > [ 1.253615] [<c059f8be>] driver_register+0x6e/0x150 > [ 1.253622] [<c059f8be>] ? driver_register+0x6e/0x150 > [ 1.253630] [<c054202f>] pcie_port_service_register+0x3f/0x50 > [ 1.253638] [<c07a7b52>] pcied_init+0x16/0x83 > [ 1.253648] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 > [ 1.253657] [<c078b417>] kernel_init+0x1ad/0x2b8 > [ 1.253666] [<c04ae774>] ? sys_select+0x44/0x1a0 > [ 1.253676] [<c07a7b3c>] ? pcied_init+0x0/0x83 > [ 1.253685] [<c042337f>] ? schedule_tail+0x1f/0x50 > [ 1.253695] [<c0403e72>] ? ret_from_fork+0x6/0x1c > [ 1.253704] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.253712] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.253720] [<c0404b9b>] kernel_thread_helper+0x7/0x10 > [ 1.253728] ======================= > [ 1.253841] hpdriver 0000:00:01.0:pcie02: service driver hpdriver loaded > [ 1.254648] pciehp: HPC vendor_id 8086 device_id 283f ss_vid 0 ss_did 0 > [ 1.254730] Pid: 1, comm: swapper Not tainted 2.6.26 #110 > [ 1.254735] [<c0544545>] pci_hp_register+0x25/0x4b0 > [ 1.254744] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 > [ 1.254754] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 > [ 1.254763] [<c054631b>] pciehp_probe+0x12b/0x3f0 > [ 1.254771] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 > [ 1.254780] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 > [ 1.254789] [<c0542110>] pcie_port_probe_service+0x50/0x90 > [ 1.254797] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 > [ 1.254806] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 > [ 1.254814] [<c059f557>] driver_probe_device+0x87/0x1a0 > [ 1.254821] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 > [ 1.254830] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 > [ 1.254838] [<c059f6e9>] __driver_attach+0x79/0x80 > [ 1.254845] [<c059ee23>] bus_for_each_dev+0x53/0x80 > [ 1.254853] [<c059f3ce>] driver_attach+0x1e/0x20 > [ 1.254859] [<c059f670>] ? __driver_attach+0x0/0x80 > [ 1.254867] [<c059e7e7>] bus_add_driver+0x1b7/0x230 > [ 1.254874] [<c059f8be>] driver_register+0x6e/0x150 > [ 1.254881] [<c059f8be>] ? driver_register+0x6e/0x150 > [ 1.254889] [<c054202f>] pcie_port_service_register+0x3f/0x50 > [ 1.254897] [<c07a7b52>] pcied_init+0x16/0x83 > [ 1.254905] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 > [ 1.254914] [<c078b417>] kernel_init+0x1ad/0x2b8 > [ 1.254922] [<c04ae774>] ? sys_select+0x44/0x1a0 > [ 1.254930] [<c07a7b3c>] ? pcied_init+0x0/0x83 > [ 1.254939] [<c042337f>] ? schedule_tail+0x1f/0x50 > [ 1.254948] [<c0403e72>] ? ret_from_fork+0x6/0x1c > [ 1.254956] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.254964] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.254972] [<c0404b9b>] kernel_thread_helper+0x7/0x10 > [ 1.254980] ======================= > [ 1.255097] hpdriver 0000:00:1c.0:pcie02: service driver hpdriver loaded > [ 1.255900] pciehp: HPC vendor_id 8086 device_id 2841 ss_vid 0 ss_did 0 > [ 1.255989] Pid: 1, comm: swapper Not tainted 2.6.26 #110 > [ 1.255994] [<c0544545>] pci_hp_register+0x25/0x4b0 > [ 1.256004] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 > [ 1.256013] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 > [ 1.256023] [<c054631b>] pciehp_probe+0x12b/0x3f0 > [ 1.256030] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 > [ 1.256040] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 > [ 1.256049] [<c0542110>] pcie_port_probe_service+0x50/0x90 > [ 1.256057] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 > [ 1.256066] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 > [ 1.256074] [<c059f557>] driver_probe_device+0x87/0x1a0 > [ 1.256082] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 > [ 1.256092] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 > [ 1.256100] [<c059f6e9>] __driver_attach+0x79/0x80 > [ 1.256107] [<c059ee23>] bus_for_each_dev+0x53/0x80 > [ 1.256114] [<c059f3ce>] driver_attach+0x1e/0x20 > [ 1.256121] [<c059f670>] ? __driver_attach+0x0/0x80 > [ 1.256129] [<c059e7e7>] bus_add_driver+0x1b7/0x230 > [ 1.256136] [<c059f8be>] driver_register+0x6e/0x150 > [ 1.256143] [<c059f8be>] ? driver_register+0x6e/0x150 > [ 1.256151] [<c054202f>] pcie_port_service_register+0x3f/0x50 > [ 1.256159] [<c07a7b52>] pcied_init+0x16/0x83 > [ 1.256167] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 > [ 1.256176] [<c078b417>] kernel_init+0x1ad/0x2b8 > [ 1.256184] [<c04ae774>] ? sys_select+0x44/0x1a0 > [ 1.256192] [<c07a7b3c>] ? pcied_init+0x0/0x83 > [ 1.256201] [<c042337f>] ? schedule_tail+0x1f/0x50 > [ 1.256209] [<c0403e72>] ? ret_from_fork+0x6/0x1c > [ 1.256218] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.256226] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.256234] [<c0404b9b>] kernel_thread_helper+0x7/0x10 > [ 1.256242] ======================= > [ 1.256355] hpdriver 0000:00:1c.1:pcie02: service driver hpdriver loaded > [ 1.257191] pciehp: HPC vendor_id 8086 device_id 2843 ss_vid 0 ss_did 0 > [ 1.257273] Pid: 1, comm: swapper Not tainted 2.6.26 #110 > [ 1.257278] [<c0544545>] pci_hp_register+0x25/0x4b0 > [ 1.257287] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 > [ 1.257297] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 > [ 1.257306] [<c054631b>] pciehp_probe+0x12b/0x3f0 > [ 1.257313] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 > [ 1.257323] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 > [ 1.257332] [<c0542110>] pcie_port_probe_service+0x50/0x90 > [ 1.257340] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 > [ 1.257349] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 > [ 1.257358] [<c059f557>] driver_probe_device+0x87/0x1a0 > [ 1.257365] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 > [ 1.257374] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 > [ 1.257383] [<c059f6e9>] __driver_attach+0x79/0x80 > [ 1.257390] [<c059ee23>] bus_for_each_dev+0x53/0x80 > [ 1.257397] [<c059f3ce>] driver_attach+0x1e/0x20 > [ 1.257403] [<c059f670>] ? __driver_attach+0x0/0x80 > [ 1.257411] [<c059e7e7>] bus_add_driver+0x1b7/0x230 > [ 1.257419] [<c059f8be>] driver_register+0x6e/0x150 > [ 1.257426] [<c059f8be>] ? driver_register+0x6e/0x150 > [ 1.257434] [<c054202f>] pcie_port_service_register+0x3f/0x50 > [ 1.257442] [<c07a7b52>] pcied_init+0x16/0x83 > [ 1.257450] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 > [ 1.257459] [<c078b417>] kernel_init+0x1ad/0x2b8 > [ 1.257467] [<c04ae774>] ? sys_select+0x44/0x1a0 > [ 1.257475] [<c07a7b3c>] ? pcied_init+0x0/0x83 > [ 1.257484] [<c042337f>] ? schedule_tail+0x1f/0x50 > [ 1.257492] [<c0403e72>] ? ret_from_fork+0x6/0x1c > [ 1.257500] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.257509] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.257517] [<c0404b9b>] kernel_thread_helper+0x7/0x10 > [ 1.257524] ======================= > [ 1.257639] hpdriver 0000:00:1c.2:pcie02: service driver hpdriver loaded > [ 1.258440] pciehp: HPC vendor_id 8086 device_id 2845 ss_vid 0 ss_did 0 > [ 1.258522] Pid: 1, comm: swapper Not tainted 2.6.26 #110 > [ 1.258527] [<c0544545>] pci_hp_register+0x25/0x4b0 > [ 1.258537] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 > [ 1.258546] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 > [ 1.258556] [<c054631b>] pciehp_probe+0x12b/0x3f0 > [ 1.258564] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 > [ 1.258573] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 > [ 1.258583] [<c0542110>] pcie_port_probe_service+0x50/0x90 > [ 1.258591] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 > [ 1.258600] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 > [ 1.258609] [<c059f557>] driver_probe_device+0x87/0x1a0 > [ 1.258616] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 > [ 1.258626] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 > [ 1.258634] [<c059f6e9>] __driver_attach+0x79/0x80 > [ 1.258642] [<c059ee23>] bus_for_each_dev+0x53/0x80 > [ 1.258649] [<c059f3ce>] driver_attach+0x1e/0x20 > [ 1.258656] [<c059f670>] ? __driver_attach+0x0/0x80 > [ 1.258665] [<c059e7e7>] bus_add_driver+0x1b7/0x230 > [ 1.258672] [<c059f8be>] driver_register+0x6e/0x150 > [ 1.258679] [<c059f8be>] ? driver_register+0x6e/0x150 > [ 1.258687] [<c054202f>] pcie_port_service_register+0x3f/0x50 > [ 1.258695] [<c07a7b52>] pcied_init+0x16/0x83 > [ 1.258703] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 > [ 1.258712] [<c078b417>] kernel_init+0x1ad/0x2b8 > [ 1.258719] [<c04ae774>] ? sys_select+0x44/0x1a0 > [ 1.258728] [<c07a7b3c>] ? pcied_init+0x0/0x83 > [ 1.258737] [<c042337f>] ? schedule_tail+0x1f/0x50 > [ 1.258745] [<c0403e72>] ? ret_from_fork+0x6/0x1c > [ 1.258753] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.258761] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.258769] [<c0404b9b>] kernel_thread_helper+0x7/0x10 > [ 1.258777] ======================= > [ 1.258893] hpdriver 0000:00:1c.3:pcie02: service driver hpdriver loaded > [ 1.259701] pciehp: HPC vendor_id 8086 device_id 2847 ss_vid 0 ss_did 0 > [ 1.259787] Pid: 1, comm: swapper Not tainted 2.6.26 #110 > [ 1.259791] [<c0544545>] pci_hp_register+0x25/0x4b0 > [ 1.259801] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 > [ 1.259810] [<c05462ad>] ? pciehp_probe+0xbd/0x3f0 > [ 1.259819] [<c054631b>] pciehp_probe+0x12b/0x3f0 > [ 1.259827] [<c04e8b58>] ? sysfs_add_one+0x18/0x50 > [ 1.259836] [<c04e9a94>] ? sysfs_do_create_link+0xa4/0x140 > [ 1.259845] [<c0542110>] pcie_port_probe_service+0x50/0x90 > [ 1.259853] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 > [ 1.259862] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 > [ 1.259870] [<c059f557>] driver_probe_device+0x87/0x1a0 > [ 1.259877] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 > [ 1.259886] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 > [ 1.259894] [<c059f6e9>] __driver_attach+0x79/0x80 > [ 1.259901] [<c059ee23>] bus_for_each_dev+0x53/0x80 > [ 1.259908] [<c059f3ce>] driver_attach+0x1e/0x20 > [ 1.259915] [<c059f670>] ? __driver_attach+0x0/0x80 > [ 1.259923] [<c059e7e7>] bus_add_driver+0x1b7/0x230 > [ 1.259930] [<c059f8be>] driver_register+0x6e/0x150 > [ 1.259937] [<c059f8be>] ? driver_register+0x6e/0x150 > [ 1.259945] [<c054202f>] pcie_port_service_register+0x3f/0x50 > [ 1.259954] [<c07a7b52>] pcied_init+0x16/0x83 > [ 1.259962] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 > [ 1.259971] [<c078b417>] kernel_init+0x1ad/0x2b8 > [ 1.259978] [<c04ae774>] ? sys_select+0x44/0x1a0 > [ 1.259987] [<c07a7b3c>] ? pcied_init+0x0/0x83 > [ 1.259996] [<c042337f>] ? schedule_tail+0x1f/0x50 > [ 1.260004] [<c0403e72>] ? ret_from_fork+0x6/0x1c > [ 1.260012] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.260020] [<c078b26a>] ? kernel_init+0x0/0x2b8 > [ 1.260028] [<c0404b9b>] kernel_thread_helper+0x7/0x10 > [ 1.260036] ======================= > [ 1.260041] pciehp: pci_hp_register failed with error -17 > [ 1.260176] pciehp: Failed to register slot because of name collision. Try 'pciehp_slot_with_bus' module option. > [ 1.260318] pciehp: pciehp: slot initialization failed > [ 1.260576] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 > > > -- > -- Pierre Ossman > > Linux kernel, MMC maintainer http://www.kernel.org > rdesktop, core developer http://www.rdesktop.org > > WARNING: This correspondence is being monitored by the > Swedish government. Make sure your server uses encryption > for SMTP traffic and consider using PGP for end-to-end > encryption. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 23:08 ` Alex Chiang @ 2008-07-24 23:29 ` Pierre Ossman 2008-07-25 3:29 ` Matthew Wilcox 0 siblings, 1 reply; 6+ messages in thread From: Pierre Ossman @ 2008-07-24 23:29 UTC (permalink / raw) To: Alex Chiang; +Cc: Jesse Barnes, Kenji Kaneshige, LKML, linux-pci [-- Attachment #1: Type: text/plain, Size: 24179 bytes --] On Thu, 24 Jul 2008 17:08:27 -0600 Alex Chiang <achiang@hp.com> wrote: > Sorry for one more round-trip, but could you turn on debugging > for pciehp as well? > Same thing, with debugging: [ 1.247138] pcieport-driver 0000:00:01.0: found MSI capability [ 1.247203] pci_express 0000:00:01.0:pcie00: allocate port service [ 1.247316] pci_express 0000:00:01.0:pcie02: allocate port service [ 1.247425] pci_express 0000:00:01.0:pcie03: allocate port service [ 1.247655] PCI: Setting latency timer of device 0000:00:1c.0 to 64 [ 1.247803] pcieport-driver 0000:00:1c.0: found MSI capability [ 1.247945] pci_express 0000:00:1c.0:pcie00: allocate port service [ 1.248058] pci_express 0000:00:1c.0:pcie02: allocate port service [ 1.248166] pci_express 0000:00:1c.0:pcie03: allocate port service [ 1.248488] PCI: Setting latency timer of device 0000:00:1c.1 to 64 [ 1.248635] pcieport-driver 0000:00:1c.1: found MSI capability [ 1.248776] pci_express 0000:00:1c.1:pcie00: allocate port service [ 1.248909] pci_express 0000:00:1c.1:pcie02: allocate port service [ 1.249015] pci_express 0000:00:1c.1:pcie03: allocate port service [ 1.249344] PCI: Setting latency timer of device 0000:00:1c.2 to 64 [ 1.249492] pcieport-driver 0000:00:1c.2: found MSI capability [ 1.249633] pci_express 0000:00:1c.2:pcie00: allocate port service [ 1.249743] pci_express 0000:00:1c.2:pcie02: allocate port service [ 1.249852] pci_express 0000:00:1c.2:pcie03: allocate port service [ 1.250175] PCI: Setting latency timer of device 0000:00:1c.3 to 64 [ 1.250322] pcieport-driver 0000:00:1c.3: found MSI capability [ 1.250463] pci_express 0000:00:1c.3:pcie00: allocate port service [ 1.250570] pci_express 0000:00:1c.3:pcie02: allocate port service [ 1.250680] pci_express 0000:00:1c.3:pcie03: allocate port service [ 1.251001] PCI: Setting latency timer of device 0000:00:1c.4 to 64 [ 1.251148] pcieport-driver 0000:00:1c.4: found MSI capability [ 1.251289] pci_express 0000:00:1c.4:pcie00: allocate port service [ 1.251397] pci_express 0000:00:1c.4:pcie02: allocate port service [ 1.251510] pci_express 0000:00:1c.4:pcie03: allocate port service [ 1.252030] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 1.252940] pciehp: Hotplug Controller: [ 1.252946] pciehp: Seg/Bus/Dev/Func/IRQ : 0000:00:01.0 IRQ 223 [ 1.252951] pciehp: Vendor ID : 0x8086 [ 1.252955] pciehp: Device ID : 0x2a01 [ 1.252959] pciehp: Subsystem ID : 0x0000 [ 1.252962] pciehp: Subsystem Vendor ID : 0x0000 [ 1.252966] pciehp: PCIe Cap offset : 0xa0 [ 1.252972] pciehp: PCI resource [7] : 0x1000@0x2000 [ 1.252977] pciehp: PCI resource [8] : 0x3000000@0xd4000000 [ 1.252981] pciehp: PCI resource [9] : 0x10000000@0xe0000000 [ 1.252986] pciehp: Slot Capabilities : 0x000c25c0 [ 1.252990] pciehp: Physical Slot Number : 1 [ 1.252994] pciehp: Attention Button : no [ 1.252998] pciehp: Power Controller : no [ 1.253002] pciehp: MRL Sensor : no [ 1.253006] pciehp: Attention Indicator : no [ 1.253009] pciehp: Power Indicator : no [ 1.253013] pciehp: Hot-Plug Surprise : no [ 1.253017] pciehp: EMI Present : no [ 1.253020] pciehp: Comamnd Completed : no [ 1.253026] pciehp: Slot Status : 0x0048 [ 1.253031] pciehp: Slot Control : 0x01c0 [ 1.253103] pciehp: HPC vendor_id 8086 device_id 2a01 ss_vid 0 ss_did 0 [ 1.253142] pciehp: get_power_status - physical_slot = 1 [ 1.253149] pciehp: hpc_get_power_status: SLOTCTRL b8 value read 1e8 [ 1.253154] pciehp: get_attention_status - physical_slot = 1 [ 1.253161] pciehp: hpc_get_attention_status: SLOTCTRL b8, value read 1e8 [ 1.253166] pciehp: get_latch_status - physical_slot = 1 [ 1.253172] pciehp: get_adapter_status - physical_slot = 1 [ 1.253179] pciehp: Registering bus=1 dev=0 hp_slot=0 sun=1 slot_device_offset=0 [ 1.253187] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.253193] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.253208] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.253218] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.253226] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.253235] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.253247] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.253256] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.253263] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.253274] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.253282] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.253289] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.253296] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.253303] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.253310] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.253318] [<c059f8be>] driver_register+0x6e/0x150 [ 1.253325] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.253332] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.253340] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.253350] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.253359] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.253368] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.253378] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.253387] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.253396] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.253405] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.253413] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.253421] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.253429] ======================= [ 1.253543] hpdriver 0000:00:01.0:pcie02: service driver hpdriver loaded [ 1.254331] pciehp: Hotplug Controller: [ 1.254337] pciehp: Seg/Bus/Dev/Func/IRQ : 0000:00:1c.0 IRQ 222 [ 1.254342] pciehp: Vendor ID : 0x8086 [ 1.254346] pciehp: Device ID : 0x283f [ 1.254350] pciehp: Subsystem ID : 0x0000 [ 1.254353] pciehp: Subsystem Vendor ID : 0x0000 [ 1.254358] pciehp: PCIe Cap offset : 0x40 [ 1.254363] pciehp: PCI resource [7] : 0x1000@0x3000 [ 1.254367] pciehp: PCI resource [8] : 0x2000000@0xfc000000 [ 1.254372] pciehp: PCI resource [9] : 0x100000@0xf8000000 [ 1.254377] pciehp: Slot Capabilities : 0x0010a0e0 [ 1.254381] pciehp: Physical Slot Number : 2 [ 1.254384] pciehp: Attention Button : no [ 1.254389] pciehp: Power Controller : no [ 1.254392] pciehp: MRL Sensor : no [ 1.254396] pciehp: Attention Indicator : no [ 1.254400] pciehp: Power Indicator : no [ 1.254404] pciehp: Hot-Plug Surprise : yes [ 1.254408] pciehp: EMI Present : no [ 1.254411] pciehp: Comamnd Completed : yes [ 1.254419] pciehp: Slot Status : 0x0000 [ 1.254428] pciehp: Slot Control : 0x0000 [ 1.254451] pciehp: HPC vendor_id 8086 device_id 283f ss_vid 0 ss_did 0 [ 1.254513] pciehp: get_power_status - physical_slot = 2 [ 1.254522] pciehp: hpc_get_power_status: SLOTCTRL 58 value read 38 [ 1.254527] pciehp: get_attention_status - physical_slot = 2 [ 1.254536] pciehp: hpc_get_attention_status: SLOTCTRL 58, value read 38 [ 1.254541] pciehp: get_latch_status - physical_slot = 2 [ 1.254550] pciehp: get_adapter_status - physical_slot = 2 [ 1.254560] pciehp: Registering bus=2 dev=0 hp_slot=0 sun=2 slot_device_offset=0 [ 1.254566] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.254571] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.254580] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.254590] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.254598] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.254606] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.254616] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.254624] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.254631] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.254641] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.254649] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.254656] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.254663] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.254670] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.254678] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.254685] [<c059f8be>] driver_register+0x6e/0x150 [ 1.254692] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.254700] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.254709] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.254717] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.254725] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.254733] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.254742] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.254751] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.254759] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.254767] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.254776] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.254784] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.254792] ======================= [ 1.254909] hpdriver 0000:00:1c.0:pcie02: service driver hpdriver loaded [ 1.255694] pciehp: Hotplug Controller: [ 1.255700] pciehp: Seg/Bus/Dev/Func/IRQ : 0000:00:1c.1 IRQ 221 [ 1.255704] pciehp: Vendor ID : 0x8086 [ 1.255709] pciehp: Device ID : 0x2841 [ 1.255712] pciehp: Subsystem ID : 0x0000 [ 1.255716] pciehp: Subsystem Vendor ID : 0x0000 [ 1.255720] pciehp: PCIe Cap offset : 0x40 [ 1.255725] pciehp: PCI resource [7] : 0x1000@0x4000 [ 1.255730] pciehp: PCI resource [8] : 0x3200000@0xdc100000 [ 1.255735] pciehp: PCI resource [9] : 0x100000@0xdfd00000 [ 1.255739] pciehp: Slot Capabilities : 0x0018a0e0 [ 1.255743] pciehp: Physical Slot Number : 3 [ 1.255747] pciehp: Attention Button : no [ 1.255750] pciehp: Power Controller : no [ 1.255754] pciehp: MRL Sensor : no [ 1.255758] pciehp: Attention Indicator : no [ 1.255762] pciehp: Power Indicator : no [ 1.255765] pciehp: Hot-Plug Surprise : yes [ 1.255769] pciehp: EMI Present : no [ 1.255773] pciehp: Comamnd Completed : yes [ 1.255781] pciehp: Slot Status : 0x0148 [ 1.255792] pciehp: Slot Control : 0x0000 [ 1.255817] pciehp: HPC vendor_id 8086 device_id 2841 ss_vid 0 ss_did 0 [ 1.255884] pciehp: get_power_status - physical_slot = 3 [ 1.255894] pciehp: hpc_get_power_status: SLOTCTRL 58 value read 38 [ 1.255899] pciehp: get_attention_status - physical_slot = 3 [ 1.255909] pciehp: hpc_get_attention_status: SLOTCTRL 58, value read 38 [ 1.255914] pciehp: get_latch_status - physical_slot = 3 [ 1.255922] pciehp: get_adapter_status - physical_slot = 3 [ 1.255932] pciehp: Registering bus=3 dev=0 hp_slot=0 sun=3 slot_device_offset=0 [ 1.255938] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.255943] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.255952] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.255962] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.255971] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.255978] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.255988] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.255996] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.256003] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.256013] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.256021] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.256028] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.256035] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.256042] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.256050] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.256057] [<c059f8be>] driver_register+0x6e/0x150 [ 1.256064] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.256072] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.256081] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.256089] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.256098] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.256105] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.256114] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.256122] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.256131] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.256139] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.256147] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.256155] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.256163] ======================= [ 1.256279] hpdriver 0000:00:1c.1:pcie02: service driver hpdriver loaded [ 1.257096] pciehp: Hotplug Controller: [ 1.257101] pciehp: Seg/Bus/Dev/Func/IRQ : 0000:00:1c.2 IRQ 220 [ 1.257106] pciehp: Vendor ID : 0x8086 [ 1.257110] pciehp: Device ID : 0x2843 [ 1.257114] pciehp: Subsystem ID : 0x0000 [ 1.257117] pciehp: Subsystem Vendor ID : 0x0000 [ 1.257121] pciehp: PCIe Cap offset : 0x40 [ 1.257126] pciehp: PCI resource [7] : 0x1000@0x5000 [ 1.257131] pciehp: PCI resource [8] : 0x2000000@0xd8000000 [ 1.257136] pciehp: PCI resource [9] : 0x100000@0xdfa00000 [ 1.257140] pciehp: Slot Capabilities : 0x0020a0e0 [ 1.257144] pciehp: Physical Slot Number : 4 [ 1.257148] pciehp: Attention Button : no [ 1.257152] pciehp: Power Controller : no [ 1.257155] pciehp: MRL Sensor : no [ 1.257159] pciehp: Attention Indicator : no [ 1.257163] pciehp: Power Indicator : no [ 1.257166] pciehp: Hot-Plug Surprise : yes [ 1.257170] pciehp: EMI Present : no [ 1.257173] pciehp: Comamnd Completed : yes [ 1.257181] pciehp: Slot Status : 0x0000 [ 1.257189] pciehp: Slot Control : 0x0000 [ 1.257213] pciehp: HPC vendor_id 8086 device_id 2843 ss_vid 0 ss_did 0 [ 1.257274] pciehp: get_power_status - physical_slot = 4 [ 1.257283] pciehp: hpc_get_power_status: SLOTCTRL 58 value read 38 [ 1.257288] pciehp: get_attention_status - physical_slot = 4 [ 1.257297] pciehp: hpc_get_attention_status: SLOTCTRL 58, value read 38 [ 1.257302] pciehp: get_latch_status - physical_slot = 4 [ 1.257311] pciehp: get_adapter_status - physical_slot = 4 [ 1.257320] pciehp: Registering bus=4 dev=0 hp_slot=0 sun=4 slot_device_offset=0 [ 1.257326] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.257332] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.257341] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.257351] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.257360] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.257367] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.257377] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.257385] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.257392] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.257401] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.257409] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.257417] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.257424] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.257430] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.257438] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.257445] [<c059f8be>] driver_register+0x6e/0x150 [ 1.257452] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.257460] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.257469] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.257477] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.257485] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.257493] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.257502] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.257511] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.257519] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.257527] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.257535] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.257543] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.257551] ======================= [ 1.257666] hpdriver 0000:00:1c.2:pcie02: service driver hpdriver loaded [ 1.258450] pciehp: Hotplug Controller: [ 1.258455] pciehp: Seg/Bus/Dev/Func/IRQ : 0000:00:1c.3 IRQ 219 [ 1.258460] pciehp: Vendor ID : 0x8086 [ 1.258464] pciehp: Device ID : 0x2845 [ 1.258468] pciehp: Subsystem ID : 0x0000 [ 1.258472] pciehp: Subsystem Vendor ID : 0x0000 [ 1.258476] pciehp: PCIe Cap offset : 0x40 [ 1.258480] pciehp: PCI resource [7] : 0x1000@0x6000 [ 1.258485] pciehp: PCI resource [8] : 0x2000000@0xd0000000 [ 1.258490] pciehp: PCI resource [9] : 0x100000@0xdf700000 [ 1.258495] pciehp: Slot Capabilities : 0x0028a0e0 [ 1.258499] pciehp: Physical Slot Number : 5 [ 1.258502] pciehp: Attention Button : no [ 1.258507] pciehp: Power Controller : no [ 1.258510] pciehp: MRL Sensor : no [ 1.258514] pciehp: Attention Indicator : no [ 1.258517] pciehp: Power Indicator : no [ 1.258521] pciehp: Hot-Plug Surprise : yes [ 1.258525] pciehp: EMI Present : no [ 1.258528] pciehp: Comamnd Completed : yes [ 1.258536] pciehp: Slot Status : 0x0000 [ 1.258544] pciehp: Slot Control : 0x0028 [ 1.258568] pciehp: HPC vendor_id 8086 device_id 2845 ss_vid 0 ss_did 0 [ 1.258628] pciehp: get_power_status - physical_slot = 5 [ 1.258638] pciehp: hpc_get_power_status: SLOTCTRL 58 value read 38 [ 1.258643] pciehp: get_attention_status - physical_slot = 5 [ 1.258652] pciehp: hpc_get_attention_status: SLOTCTRL 58, value read 38 [ 1.258657] pciehp: get_latch_status - physical_slot = 5 [ 1.258665] pciehp: get_adapter_status - physical_slot = 5 [ 1.258675] pciehp: Registering bus=5 dev=0 hp_slot=0 sun=5 slot_device_offset=0 [ 1.258681] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.258686] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.258696] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.258705] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.258713] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.258721] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.258730] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.258739] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.258746] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.258756] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.258764] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.258772] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.258778] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.258785] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.258793] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.258801] [<c059f8be>] driver_register+0x6e/0x150 [ 1.258808] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.258816] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.258824] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.258832] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.258841] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.258849] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.258857] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.258866] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.258874] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.258883] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.258891] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.258899] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.258907] ======================= [ 1.259022] hpdriver 0000:00:1c.3:pcie02: service driver hpdriver loaded [ 1.259814] pciehp: Hotplug Controller: [ 1.259820] pciehp: Seg/Bus/Dev/Func/IRQ : 0000:00:1c.4 IRQ 218 [ 1.259825] pciehp: Vendor ID : 0x8086 [ 1.259829] pciehp: Device ID : 0x2847 [ 1.259833] pciehp: Subsystem ID : 0x0000 [ 1.259836] pciehp: Subsystem Vendor ID : 0x0000 [ 1.259840] pciehp: PCIe Cap offset : 0x40 [ 1.259845] pciehp: PCI resource [7] : 0x1000@0x7000 [ 1.259850] pciehp: PCI resource [8] : 0x2000000@0xcc000000 [ 1.259855] pciehp: PCI resource [9] : 0x100000@0xdf400000 [ 1.259859] pciehp: Slot Capabilities : 0x0010a0e0 [ 1.259863] pciehp: Physical Slot Number : 2 [ 1.259867] pciehp: Attention Button : no [ 1.259871] pciehp: Power Controller : no [ 1.259875] pciehp: MRL Sensor : no [ 1.259879] pciehp: Attention Indicator : no [ 1.259883] pciehp: Power Indicator : no [ 1.259886] pciehp: Hot-Plug Surprise : yes [ 1.259890] pciehp: EMI Present : no [ 1.259893] pciehp: Comamnd Completed : yes [ 1.259901] pciehp: Slot Status : 0x0000 [ 1.259910] pciehp: Slot Control : 0x0000 [ 1.259933] pciehp: HPC vendor_id 8086 device_id 2847 ss_vid 0 ss_did 0 [ 1.259994] pciehp: get_power_status - physical_slot = 2 [ 1.260003] pciehp: hpc_get_power_status: SLOTCTRL 58 value read 38 [ 1.260008] pciehp: get_attention_status - physical_slot = 2 [ 1.260017] pciehp: hpc_get_attention_status: SLOTCTRL 58, value read 38 [ 1.260022] pciehp: get_latch_status - physical_slot = 2 [ 1.260031] pciehp: get_adapter_status - physical_slot = 2 [ 1.260041] pciehp: Registering bus=d dev=0 hp_slot=0 sun=2 slot_device_offset=0 [ 1.260047] Pid: 1, comm: swapper Not tainted 2.6.26 #110 [ 1.260052] [<c0544545>] pci_hp_register+0x25/0x4b0 [ 1.260061] [<c0545e3e>] ? get_adapter_status+0x2e/0x70 [ 1.260071] [<c054631b>] pciehp_probe+0x12b/0x3f0 [ 1.260079] [<c0542110>] pcie_port_probe_service+0x50/0x90 [ 1.260087] [<c04e9b67>] ? sysfs_create_link+0x17/0x20 [ 1.260096] [<c059f42d>] ? driver_sysfs_add+0x5d/0x90 [ 1.260104] [<c059f557>] driver_probe_device+0x87/0x1a0 [ 1.260111] [<c066f841>] ? _spin_lock_irqsave+0x21/0x40 [ 1.260121] [<c066fb66>] ? _spin_unlock_irqrestore+0x16/0x40 [ 1.260129] [<c059f6e9>] __driver_attach+0x79/0x80 [ 1.260137] [<c059ee23>] bus_for_each_dev+0x53/0x80 [ 1.260144] [<c059f3ce>] driver_attach+0x1e/0x20 [ 1.260151] [<c059f670>] ? __driver_attach+0x0/0x80 [ 1.260159] [<c059e7e7>] bus_add_driver+0x1b7/0x230 [ 1.260166] [<c059f8be>] driver_register+0x6e/0x150 [ 1.260174] [<c059f8be>] ? driver_register+0x6e/0x150 [ 1.260182] [<c054202f>] pcie_port_service_register+0x3f/0x50 [ 1.260191] [<c07a7b52>] pcied_init+0x16/0x83 [ 1.260199] [<c07a7b38>] ? pci_hotplug_init+0x1f/0x23 [ 1.260208] [<c078b417>] kernel_init+0x1ad/0x2b8 [ 1.260216] [<c04ae774>] ? sys_select+0x44/0x1a0 [ 1.260225] [<c07a7b3c>] ? pcied_init+0x0/0x83 [ 1.260234] [<c042337f>] ? schedule_tail+0x1f/0x50 [ 1.260242] [<c0403e72>] ? ret_from_fork+0x6/0x1c [ 1.260250] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.260258] [<c078b26a>] ? kernel_init+0x0/0x2b8 [ 1.260266] [<c0404b9b>] kernel_thread_helper+0x7/0x10 [ 1.260274] ======================= [ 1.260278] pciehp: pci_hp_register failed with error -17 [ 1.260412] pciehp: Failed to register slot because of name collision. Try 'pciehp_slot_with_bus' module option. [ 1.260547] pciehp: pciehp: slot initialization failed [ 1.260817] pciehp: pcie_port_service_register = 0 [ 1.260822] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 -- -- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org WARNING: This correspondence is being monitored by the Swedish government. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-24 23:29 ` Pierre Ossman @ 2008-07-25 3:29 ` Matthew Wilcox 2008-07-25 4:57 ` Kenji Kaneshige 0 siblings, 1 reply; 6+ messages in thread From: Matthew Wilcox @ 2008-07-25 3:29 UTC (permalink / raw) To: Pierre Ossman; +Cc: Alex Chiang, Jesse Barnes, Kenji Kaneshige, LKML, linux-pci On Fri, Jul 25, 2008 at 01:29:16AM +0200, Pierre Ossman wrote: > On Thu, 24 Jul 2008 17:08:27 -0600 > Alex Chiang <achiang@hp.com> wrote: > > > Sorry for one more round-trip, but could you turn on debugging > > for pciehp as well? > > > > Same thing, with debugging: I have a laptop with a similar problem (though I don't have pciehp enabled, so I didn't notice it). Obviously, we need to fix this. There is no question in my mind that firmware has programmed the slot numbers incorrectly. Here's the evidence from lspci -vvv: 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03) Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surpise+ Slot # 2, PowerLimit 6.500000; Interlock- NoCompl- 00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03) Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00 SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surpise+ Slot # 2, PowerLimit 6.500000; Interlock- NoCompl- I don't think anyone can credibly argue that this is correct. They're both PCIe devices, they're both both indicating that they have a slot (maybe if I get my screwdriver out, I can see if there's really a slot ...), they're on the same bus (so I don't know how the with_bus parameter makes any difference). I've always hated that with_bus parameter. I don't like it being a parameter and I don't like the names it produces. Part of the problem is the kobject API. It really hates you trying to register a duplicate name and won't just return -EEXIST and let you try a new name. Instead it prints an ugly warning and dumps stack. See kobject_add_internal() in lib/kobject.c. So we need a way to find if there's already a slot of this name. I don't see a kobject routine to do that. Maybe we can do it internally to the pci slot code. Then we need to pick a new name for the kobject if it does collide. My suggestion is that the second time we find an object named "2", we call it "2dup1" (the third time "2dup2", etc.) Other opinions I've seen include "2a", "2b", ... or "2-1", "2-2", ... or "2-brokenfw1", "2-brokenfw2". I'm at OLS this week, so no patch from me. -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-25 3:29 ` Matthew Wilcox @ 2008-07-25 4:57 ` Kenji Kaneshige 2008-07-30 2:38 ` Alex Chiang 0 siblings, 1 reply; 6+ messages in thread From: Kenji Kaneshige @ 2008-07-25 4:57 UTC (permalink / raw) To: Matthew Wilcox; +Cc: Pierre Ossman, Alex Chiang, Jesse Barnes, LKML, linux-pci Matthew Wilcox wrote: > On Fri, Jul 25, 2008 at 01:29:16AM +0200, Pierre Ossman wrote: >> On Thu, 24 Jul 2008 17:08:27 -0600 >> Alex Chiang <achiang@hp.com> wrote: >> >>> Sorry for one more round-trip, but could you turn on debugging >>> for pciehp as well? >>> >> Same thing, with debugging: > > I have a laptop with a similar problem (though I don't have pciehp > enabled, so I didn't notice it). Obviously, we need to fix this. > > There is no question in my mind that firmware has programmed the slot > numbers incorrectly. Here's the evidence from lspci -vvv: > > 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03) > Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00 > SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surpise+ > Slot # 2, PowerLimit 6.500000; Interlock- NoCompl- > 00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03) > Capabilities: [40] Express (v1) Root Port (Slot+), MSI 00 > SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surpise+ > Slot # 2, PowerLimit 6.500000; Interlock- NoCompl- > > I don't think anyone can credibly argue that this is correct. They're > both PCIe devices, they're both both indicating that they have a slot > (maybe if I get my screwdriver out, I can see if there's really a slot > ...), they're on the same bus (so I don't know how the with_bus > parameter makes any difference). > > I've always hated that with_bus parameter. I don't like it being a > parameter and I don't like the names it produces. > > Part of the problem is the kobject API. It really hates you trying to > register a duplicate name and won't just return -EEXIST and let you try > a new name. Instead it prints an ugly warning and dumps stack. See > kobject_add_internal() in lib/kobject.c. > I'm thinking the same idea. (I just sent that before reading this mail) > So we need a way to find if there's already a slot of this name. I > don't see a kobject routine to do that. Maybe we can do it internally > to the pci slot code. > > Then we need to pick a new name for the kobject if it does collide. > My suggestion is that the second time we find an object named "2", we > call it "2dup1" (the third time "2dup2", etc.) Other opinions I've > seen include "2a", "2b", ... or "2-1", "2-2", ... or "2-brokenfw1", > "2-brokenfw2". > That looks quite better than using bus number. Thanks, Kenji Kaneshige ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: post 2.6.26 requires pciehp_slot_with_bus 2008-07-25 4:57 ` Kenji Kaneshige @ 2008-07-30 2:38 ` Alex Chiang 2008-07-30 2:42 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang 0 siblings, 1 reply; 6+ messages in thread From: Alex Chiang @ 2008-07-30 2:38 UTC (permalink / raw) To: Kenji Kaneshige Cc: Matthew Wilcox, Pierre Ossman, Jesse Barnes, LKML, linux-pci * Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>: > Matthew Wilcox wrote: >> So we need a way to find if there's already a slot of this >> name. I don't see a kobject routine to do that. Maybe we can >> do it internally to the pci slot code. pci_hp_register already does this with get_slot_from_name(). >> Then we need to pick a new name for the kobject if it does >> collide. My suggestion is that the second time we find an >> object named "2", we call it "2dup1" (the third time "2dup2", >> etc.) Other opinions I've seen include "2a", "2b", ... or >> "2-1", "2-2", ... or "2-brokenfw1", "2-brokenfw2". > > That looks quite better than using bus number. I went with: - first slot to register gets "2" - second slot to register gets "2-1" - Mth slot to register gets "2-M" At first, I thought it would have been better to put this logic inside of pci_hp_register, since it knows about the collision, and could just fix stuff up for the caller. However, the problem is that each hotplug driver can have a different length for "name", and it got messy quickly. So, I just patched the two drivers that are known to be problematic. Two patches follow, against 2.6.27-rc1. Compile tested only -- I don't have hardware to replicate this. I'd say they're somewhere between RFC and requested for inclusion. I'm certainly not tied to them, just trying to show some code to implement the approach described above. If we decide that looking at _RMV + other bits is the way to go, then I'm fine with that. It would be great if Pierre and Kenji-san could try them out. Thanks. /ac ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-07-30 2:38 ` Alex Chiang @ 2008-07-30 2:42 ` Alex Chiang 2008-07-31 10:32 ` Kenji Kaneshige 0 siblings, 1 reply; 6+ messages in thread From: Alex Chiang @ 2008-07-30 2:42 UTC (permalink / raw) To: Kenji Kaneshige, Matthew Wilcox, Pierre Ossman, Jesse Barnes, LKML, linux-pci Commit 3800345f723fd130d50434d4717b99d4a9f383c8 introduces the pciehp_slot_with_bus module parameter, which was intended to help work around broken firmware that assigns the same name to multiple slots. Commit 9e4f2e8d4ddb04ad16a3828cd9a369a5a5287009 tells the user to use the above parameter in the event of a name collision. This approach is sub-optimal because it requires too much work from the user. Instead, let's rename the slot on behalf of the user. If firmware assigns the name N to multiple slots, then: The first registered slot is assigned N The second registered slot is assigned N-1 The third registered slot is assigned N-2 The Mth registered slot becomes N-M In the event we overflow the slot->name parameter, we report an error to the user. Signed-off-by: Alex Chiang <achiang@hp.com> --- drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_core.c | 21 ++++++++++++++------- drivers/pci/hotplug/pciehp_hpc.c | 11 +---------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index e3a1e7e..9e6cec6 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -43,7 +43,6 @@ extern int pciehp_poll_mode; extern int pciehp_poll_time; extern int pciehp_debug; extern int pciehp_force; -extern int pciehp_slot_with_bus; extern struct workqueue_struct *pciehp_wq; #define dbg(format, arg...) \ diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 3677495..4fd5355 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -41,7 +41,6 @@ int pciehp_debug; int pciehp_poll_mode; int pciehp_poll_time; int pciehp_force; -int pciehp_slot_with_bus; struct workqueue_struct *pciehp_wq; #define DRIVER_VERSION "0.4" @@ -56,12 +55,10 @@ module_param(pciehp_debug, bool, 0644); module_param(pciehp_poll_mode, bool, 0644); module_param(pciehp_poll_time, int, 0644); module_param(pciehp_force, bool, 0644); -module_param(pciehp_slot_with_bus, bool, 0644); MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing"); -MODULE_PARM_DESC(pciehp_slot_with_bus, "Use bus number in the slot name"); #define PCIE_MODULE_NAME "pciehp" @@ -194,6 +191,7 @@ static int init_slots(struct controller *ctrl) struct slot *slot; struct hotplug_slot *hotplug_slot; struct hotplug_slot_info *info; + int len, dup = 1; int retval = -ENOMEM; list_for_each_entry(slot, &ctrl->slot_list, slot_list) { @@ -220,15 +218,24 @@ static int init_slots(struct controller *ctrl) dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x " "slot_device_offset=%x\n", slot->bus, slot->device, slot->hp_slot, slot->number, ctrl->slot_device_offset); +duplicate_name: retval = pci_hp_register(hotplug_slot, ctrl->pci_dev->subordinate, slot->device); if (retval) { + /* + * If slot N already exists, we'll try to create + * slot N-1, N-2 ... N-M, until we overflow. + */ + if (retval == -EEXIST) { + len = snprintf(slot->name, SLOT_NAME_SIZE, + "%d-%d", slot->number, dup++); + if (len < SLOT_NAME_SIZE) + goto duplicate_name; + else + err("duplicate slot name overflow\n"); + } err("pci_hp_register failed with error %d\n", retval); - if (retval == -EEXIST) - err("Failed to register slot because of name " - "collision. Try \'pciehp_slot_with_bus\' " - "module option.\n"); goto error_info; } /* create additional sysfs entries */ diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index ad27e9e..ab31f5b 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -1030,15 +1030,6 @@ static void pcie_shutdown_notification(struct controller *ctrl) pciehp_free_irq(ctrl); } -static void make_slot_name(struct slot *slot) -{ - if (pciehp_slot_with_bus) - snprintf(slot->name, SLOT_NAME_SIZE, "%04d_%04d", - slot->bus, slot->number); - else - snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); -} - static int pcie_init_slot(struct controller *ctrl) { struct slot *slot; @@ -1053,7 +1044,7 @@ static int pcie_init_slot(struct controller *ctrl) slot->device = ctrl->slot_device_offset + slot->hp_slot; slot->hpc_ops = ctrl->hpc_ops; slot->number = ctrl->first_slot; - make_slot_name(slot); + snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); mutex_init(&slot->lock); INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); list_add(&slot->slot_list, &ctrl->slot_list); -- 1.6.0.rc0.g95f8 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-07-30 2:42 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang @ 2008-07-31 10:32 ` Kenji Kaneshige 0 siblings, 0 replies; 6+ messages in thread From: Kenji Kaneshige @ 2008-07-31 10:32 UTC (permalink / raw) To: Alex Chiang, Kenji Kaneshige, Matthew Wilcox, Pierre Ossman, Jesse Barnes, LKML, linux-pci Tested-by & Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Thnaks, Kenji Kaneshige Alex Chiang wrote: > Commit 3800345f723fd130d50434d4717b99d4a9f383c8 introduces the > pciehp_slot_with_bus module parameter, which was intended to help > work around broken firmware that assigns the same name to multiple > slots. > > Commit 9e4f2e8d4ddb04ad16a3828cd9a369a5a5287009 tells the user to > use the above parameter in the event of a name collision. > > This approach is sub-optimal because it requires too much work from > the user. > > Instead, let's rename the slot on behalf of the user. If firmware > assigns the name N to multiple slots, then: > > The first registered slot is assigned N > The second registered slot is assigned N-1 > The third registered slot is assigned N-2 > The Mth registered slot becomes N-M > > In the event we overflow the slot->name parameter, we report an > error to the user. > > Signed-off-by: Alex Chiang <achiang@hp.com> > --- > drivers/pci/hotplug/pciehp.h | 1 - > drivers/pci/hotplug/pciehp_core.c | 21 ++++++++++++++------- > drivers/pci/hotplug/pciehp_hpc.c | 11 +---------- > 3 files changed, 15 insertions(+), 18 deletions(-) > > diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h > index e3a1e7e..9e6cec6 100644 > --- a/drivers/pci/hotplug/pciehp.h > +++ b/drivers/pci/hotplug/pciehp.h > @@ -43,7 +43,6 @@ extern int pciehp_poll_mode; > extern int pciehp_poll_time; > extern int pciehp_debug; > extern int pciehp_force; > -extern int pciehp_slot_with_bus; > extern struct workqueue_struct *pciehp_wq; > > #define dbg(format, arg...) \ > diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c > index 3677495..4fd5355 100644 > --- a/drivers/pci/hotplug/pciehp_core.c > +++ b/drivers/pci/hotplug/pciehp_core.c > @@ -41,7 +41,6 @@ int pciehp_debug; > int pciehp_poll_mode; > int pciehp_poll_time; > int pciehp_force; > -int pciehp_slot_with_bus; > struct workqueue_struct *pciehp_wq; > > #define DRIVER_VERSION "0.4" > @@ -56,12 +55,10 @@ module_param(pciehp_debug, bool, 0644); > module_param(pciehp_poll_mode, bool, 0644); > module_param(pciehp_poll_time, int, 0644); > module_param(pciehp_force, bool, 0644); > -module_param(pciehp_slot_with_bus, bool, 0644); > MODULE_PARM_DESC(pciehp_debug, "Debugging mode enabled or not"); > MODULE_PARM_DESC(pciehp_poll_mode, "Using polling mechanism for hot-plug events or not"); > MODULE_PARM_DESC(pciehp_poll_time, "Polling mechanism frequency, in seconds"); > MODULE_PARM_DESC(pciehp_force, "Force pciehp, even if _OSC and OSHP are missing"); > -MODULE_PARM_DESC(pciehp_slot_with_bus, "Use bus number in the slot name"); > > #define PCIE_MODULE_NAME "pciehp" > > @@ -194,6 +191,7 @@ static int init_slots(struct controller *ctrl) > struct slot *slot; > struct hotplug_slot *hotplug_slot; > struct hotplug_slot_info *info; > + int len, dup = 1; > int retval = -ENOMEM; > > list_for_each_entry(slot, &ctrl->slot_list, slot_list) { > @@ -220,15 +218,24 @@ static int init_slots(struct controller *ctrl) > dbg("Registering bus=%x dev=%x hp_slot=%x sun=%x " > "slot_device_offset=%x\n", slot->bus, slot->device, > slot->hp_slot, slot->number, ctrl->slot_device_offset); > +duplicate_name: > retval = pci_hp_register(hotplug_slot, > ctrl->pci_dev->subordinate, > slot->device); > if (retval) { > + /* > + * If slot N already exists, we'll try to create > + * slot N-1, N-2 ... N-M, until we overflow. > + */ > + if (retval == -EEXIST) { > + len = snprintf(slot->name, SLOT_NAME_SIZE, > + "%d-%d", slot->number, dup++); > + if (len < SLOT_NAME_SIZE) > + goto duplicate_name; > + else > + err("duplicate slot name overflow\n"); > + } > err("pci_hp_register failed with error %d\n", retval); > - if (retval == -EEXIST) > - err("Failed to register slot because of name " > - "collision. Try \'pciehp_slot_with_bus\' " > - "module option.\n"); > goto error_info; > } > /* create additional sysfs entries */ > diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c > index ad27e9e..ab31f5b 100644 > --- a/drivers/pci/hotplug/pciehp_hpc.c > +++ b/drivers/pci/hotplug/pciehp_hpc.c > @@ -1030,15 +1030,6 @@ static void pcie_shutdown_notification(struct controller *ctrl) > pciehp_free_irq(ctrl); > } > > -static void make_slot_name(struct slot *slot) > -{ > - if (pciehp_slot_with_bus) > - snprintf(slot->name, SLOT_NAME_SIZE, "%04d_%04d", > - slot->bus, slot->number); > - else > - snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); > -} > - > static int pcie_init_slot(struct controller *ctrl) > { > struct slot *slot; > @@ -1053,7 +1044,7 @@ static int pcie_init_slot(struct controller *ctrl) > slot->device = ctrl->slot_device_offset + slot->hp_slot; > slot->hpc_ops = ctrl->hpc_ops; > slot->number = ctrl->first_slot; > - make_slot_name(slot); > + snprintf(slot->name, SLOT_NAME_SIZE, "%d", slot->number); > mutex_init(&slot->lock); > INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); > list_add(&slot->slot_list, &ctrl->slot_list); ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-21 22:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-08-21 21:11 [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Alex Chiang 2008-08-21 21:13 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang 2008-08-21 21:13 ` [PATCH 2/2] shpchp: " Alex Chiang 2008-08-21 22:16 ` [PATCH 0/2] pciehp/shpchp prevent duplicate slot names Jesse Barnes -- strict thread matches above, loose matches on Subject: below -- 2008-07-24 21:07 post 2.6.26 requires pciehp_slot_with_bus Jesse Barnes 2008-07-24 21:51 ` Pierre Ossman 2008-07-24 22:06 ` Jesse Barnes 2008-07-24 22:29 ` Alex Chiang 2008-07-24 22:49 ` Pierre Ossman 2008-07-24 23:08 ` Alex Chiang 2008-07-24 23:29 ` Pierre Ossman 2008-07-25 3:29 ` Matthew Wilcox 2008-07-25 4:57 ` Kenji Kaneshige 2008-07-30 2:38 ` Alex Chiang 2008-07-30 2:42 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang 2008-07-31 10:32 ` Kenji Kaneshige
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®