Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kenji Kaneshige
Date: Monday, June 9, 2008 - 1:08 am

Alex Chiang wrote:

I tried your patches and I have a comment (question) about the behavior.

To emulate the (broken?) platform that assigns the same name to multiple
slots, I made a debug patch for pciehp driver to assign same name ('1000')
to all slots (my environment has two PCIe slots). With this patch, I
noticed that the behavior or pci_hp_register() (or pci_create_slot())
varies depending on whether pci_slot driver is loaded or not. See below.

(a) With pci_slot driver loaded
    I got the following error message when I loaded pciehp driver.

        pciehp: pci_hp_register failed with error -17
        pciehp: Failed to register slot because of name collision. Try
        'pciehp_slot_with_bus' module option.
        pciehp: pciehp: slot initialization failed
      
(b) Without pci_slot driver loaded
    I got the kernel stack dump and error messages when I loaded pciehp
    driver.

	kobject_add_internal failed for 1000 with -EEXIST, don't try to
	register things with the same name in the same directory.

	Call Trace:
 	 [<a000000100015180>] show_stack+0x40/0xa0
	                                sp=e0000040a086fb80 bsp=e0000040a0861158
 	 [<a000000100015210>] dump_stack+0x30/0x60
                                sp=e0000040a086fd50 bsp=e0000040a0861140
	 [<a0000001003b3910>] kobject_add_internal+0x330/0x400
	                                sp=e0000040a086fd50 bsp=e0000040a0861100
	 [<a0000001003b3bd0>] kobject_add_varg+0x90/0xc0
	                                sp=e0000040a086fd50 bsp=e0000040a08610c8
	 [<a0000001003b3c90>] kobject_init_and_add+0x90/0xc0
	                                sp=e0000040a086fd50 bsp=e0000040a0861068
	 [<a0000001003d69b0>] pci_create_slot+0x150/0x260
	                                sp=e0000040a086fd80 bsp=e0000040a0861030
	 [<a000000200b71870>] pci_hp_register+0x130/0x880 [pci_hotplug]
	                                sp=e0000040a086fd80 bsp=e0000040a0860ff0
	 [<a000000200ec1a60>] pciehp_probe+0x720/0xca0 [pciehp]

	(snip...)

	Unable to register kobject 1000
	pciehp: pci_hp_register failed with error -17
	pciehp: Failed to register slot because of name collision. Try 
	'pciehp_slot_with_bus' module option.
	pciehp: pciehp: slot initialization failed

Could you tell me why that difference happen? And my expectation is
the result should be (a) above regardless of whether pci_slot driver
is loaded or not.

Thanks,
Kenji Kaneshige


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] PCI: Introduce pci_slot, Alex Chiang, (Wed Jun 4, 1:16 pm)
[PATCH] ACPI: PCI slot detection driver, Alex Chiang, (Wed Jun 4, 1:18 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Wed Jun 4, 7:32 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Wed Jun 4, 8:20 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ..., Benjamin Herrenschmidt, (Thu Jun 5, 9:07 pm)
Re: [PATCH] kobject: Export kobject_rename for pci_hotplug ..., Benjamin Herrenschmidt, (Fri Jun 6, 4:20 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Mon Jun 9, 1:08 am)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Mon Jun 9, 8:04 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Mon Jun 9, 8:12 pm)
Re: [PATCH] ACPI: PCI slot detection driver, Len Brown, (Tue Jun 10, 11:24 am)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Jesse Barnes, (Tue Jun 10, 12:24 pm)
Re: [PATCH] ACPI: PCI slot detection driver, Alex Chiang, (Tue Jun 10, 2:17 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Tue Jun 10, 6:48 pm)
Re: [PATCH 0/4, v14] PCI, ACPI: Physical PCI slot objects, Kenji Kaneshige, (Tue Jun 10, 11:29 pm)