Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eae34c67 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI hotplug: ibmphp: Fix module ref count underflow
  PCI hotplug: acpiphp wants a 64-bit _SUN
  PCI: pciehp: fix unexpected power off with pciehp_force
  PCI: fix aer resume sanity check
parents 929096fe 3e3d0e92
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ struct acpiphp_slot {

	u8		device;		/* pci device# */

	u32		sun;		/* ACPI _SUN (slot unique number) */
	unsigned long long sun;		/* ACPI _SUN (slot unique number) */
	u32		flags;		/* see below */
};

+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ int acpiphp_register_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
	slot->hotplug_slot->info->cur_bus_speed = PCI_SPEED_UNKNOWN;

	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,
					acpiphp_slot->bridge->pci_bus,
+2 −2
Original line number Diff line number Diff line
@@ -255,13 +255,13 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)

		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),
				bridge->pci_bus->number, slot->device);
		retval = acpiphp_register_hotplug_slot(slot);
		if (retval) {
			if (retval == -EBUSY)
				warn("Slot %d already registered by another "
				warn("Slot %llu already registered by another "
					"hotplug driver\n", slot->sun);
			else
				warn("acpiphp_register_hotplug_slot failed "
+0 −5
Original line number Diff line number Diff line
@@ -1402,10 +1402,6 @@ static int __init ibmphp_init(void)
		goto error;
	}

	/* lock ourselves into memory with a module 
	 * count of -1 so that no one can unload us. */
	module_put(THIS_MODULE);

exit:
	return rc;

@@ -1423,4 +1419,3 @@ static void __exit ibmphp_exit(void)
}

module_init(ibmphp_init);
module_exit(ibmphp_exit);
+12 −11
Original line number Diff line number Diff line
@@ -432,19 +432,20 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
		goto err_out_release_ctlr;
	}

	/* Check if slot is occupied */
	t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);

	t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
	if (value && pciehp_force) {
		rc = pciehp_enable_slot(t_slot);
		if (rc)	/* -ENODEV: shouldn't happen, but deal with it */
			value = 0;
	}
	if ((POWER_CTRL(ctrl)) && !value) {
		rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
	t_slot->hpc_ops->get_adapter_status(t_slot, &value);
	if (value) {
		if (pciehp_force)
			pciehp_enable_slot(t_slot);
	} else {
		/* Power off slot if not occupied */
		if (POWER_CTRL(ctrl)) {
			rc = t_slot->hpc_ops->power_off_slot(t_slot);
			if (rc)
				goto err_out_free_ctrl_slot;
		}
	}

	return 0;

Loading