kernel-hacking-2024-linux-s.../drivers/pci
Alex Chiang d6a9e9b40b PCI: shpchp: Rename duplicate slot name N as N-1, N-2, N-M...
Commit ef0ff95f13 (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 b3bd307c62 (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.

Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-08-21 15:15:31 -07:00
..
hotplug PCI: shpchp: Rename duplicate slot name N as N-1, N-2, N-M... 2008-08-21 15:15:31 -07:00
pcie PCI: add acpi_find_root_bridge_handle 2008-08-18 13:48:04 -07:00
.gitignore
access.c PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. 2008-07-02 11:25:54 -07:00
bus.c
dmar.c PCI/DMAR: don't assume presence of RMRRs 2008-07-22 14:14:18 -07:00
hotplug-pci.c
hotplug.c
htirq.c
intel-iommu.c Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
intel-iommu.h
iova.c
iova.h
Kconfig
Makefile PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
msi.c PCI: fully restore MSI state at resume time 2008-08-07 08:52:37 -07:00
msi.h
pci-acpi.c PCI: disable ASPM per ACPI FADT setting 2008-07-28 14:56:09 -07:00
pci-driver.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
pci-sysfs.c PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev. 2008-07-02 11:25:54 -07:00
pci.c PCI PM: Export pci_pme_active to drivers 2008-08-07 15:33:36 -07:00
pci.h Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2008-07-16 17:25:46 -07:00
probe.c Merge branch 'pci-for-jesse' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into x86-merge 2008-08-18 09:54:13 -07:00
proc.c PCI: fixup sparse endianness warnings in proc.c 2008-07-22 15:19:44 -07:00
quirks.c PCI: Limit VPD length for Broadcom 5708S 2008-08-07 17:47:37 -07:00
remove.c
rom.c
search.c
setup-bus.c Merge branch 'linus' into pci-for-jesse 2008-07-18 22:39:59 +02:00
setup-irq.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
setup-res.c PCI: use dev_printk when possible 2008-06-25 16:05:13 -07:00
slot.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
syscall.c