Bläddra i källkod

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>
Justin Chen 16 år sedan
förälder
incheckning
b6adc1955d

+ 1 - 1
drivers/pci/hotplug/acpiphp.h

@@ -113,7 +113,7 @@ struct acpiphp_slot {
 
 
 	u8		device;		/* pci device# */
 	u8		device;		/* pci device# */
 
 
-	u32		sun;		/* ACPI _SUN (slot unique number) */
+	unsigned long long sun;		/* ACPI _SUN (slot unique number) */
 	u32		flags;		/* see below */
 	u32		flags;		/* see below */
 };
 };
 
 

+ 1 - 1
drivers/pci/hotplug/acpiphp_core.c

@@ -337,7 +337,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
 	slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
 	slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
 
 
 	acpiphp_slot->slot = slot;
 	acpiphp_slot->slot = slot;
-	snprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);
+	snprintf(name, SLOT_NAME_SIZE, "%llu", slot->acpi_slot->sun);
 
 
 	retval = pci_hp_register(slot->hotplug_slot,
 	retval = pci_hp_register(slot->hotplug_slot,
 					acpiphp_slot->bridge->pci_bus,
 					acpiphp_slot->bridge->pci_bus,

+ 2 - 2
drivers/pci/hotplug/acpiphp_glue.c

@@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
 
 
 		bridge->nr_slots++;
 		bridge->nr_slots++;
 
 
-		dbg("found ACPI PCI Hotplug slot %d at PCI %04x:%02x:%02x\n",
+		dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n",
 				slot->sun, pci_domain_nr(bridge->pci_bus),
 				slot->sun, pci_domain_nr(bridge->pci_bus),
 				bridge->pci_bus->number, slot->device);
 				bridge->pci_bus->number, slot->device);
 		retval = acpiphp_register_hotplug_slot(slot);
 		retval = acpiphp_register_hotplug_slot(slot);
 		if (retval) {
 		if (retval) {
 			if (retval == -EBUSY)
 			if (retval == -EBUSY)
-				warn("Slot %d already registered by another "
+				warn("Slot %llu already registered by another "
 					"hotplug driver\n", slot->sun);
 					"hotplug driver\n", slot->sun);
 			else
 			else
 				warn("acpiphp_register_hotplug_slot failed "
 				warn("acpiphp_register_hotplug_slot failed "