Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI hotplug: acpiphp wants a 64-bit _SUN

Certain HP machines require the full 64 bits of _SUN as allowed
by the ACPI spec. Without this change, we get name collisions in
the lower 32 bits of the _SUN returned by firmware.

Acked-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Justin Chen <justin.chen@hp.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Justin Chen and committed by
Jesse Barnes
b6adc195 db9aaf0b

+4 -4
+1 -1
drivers/pci/hotplug/acpiphp.h
··· 113 113 114 114 u8 device; /* pci device# */ 115 115 116 - u32 sun; /* ACPI _SUN (slot unique number) */ 116 + unsigned long long sun; /* ACPI _SUN (slot unique number) */ 117 117 u32 flags; /* see below */ 118 118 }; 119 119
+1 -1
drivers/pci/hotplug/acpiphp_core.c
··· 337 337 slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN; 338 338 339 339 acpiphp_slot->slot = slot; 340 - snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun); 340 + snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun); 341 341 342 342 retval = pci_hp_register(slot->hotplug_slot, 343 343 acpiphp_slot->bridge->pci_bus,
+2 -2
drivers/pci/hotplug/acpiphp_glue.c
··· 255 255 256 256 bridge->nr_slots++; 257 257 258 - dbg("found ACPI PCI Hotplug slot %d at PCI %04x:%02x:%02x\n", 258 + dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n", 259 259 slot->sun, pci_domain_nr(bridge->pci_bus), 260 260 bridge->pci_bus->number, slot->device); 261 261 retval = acpiphp_register_hotplug_slot(slot); 262 262 if (retval) { 263 263 if (retval == -EBUSY) 264 - warn("Slot %d already registered by another " 264 + warn("Slot %llu already registered by another " 265 265 "hotplug driver\n", slot->sun); 266 266 else 267 267 warn("acpiphp_register_hotplug_slot failed "