- pci-hotplug-introduce-pci_slot-rpaphp-correctly-call-pci_hp_register-for-empty-pci-slots.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     rpaphp: correctly call pci_hp_register for empty PCI slots
has been removed from the -mm tree.  Its filename was
     pci-hotplug-introduce-pci_slot-rpaphp-correctly-call-pci_hp_register-for-empty-pci-slots.patch

This patch was dropped because yup, these got wrecked

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: rpaphp: correctly call pci_hp_register for empty PCI slots
From: Alex Chiang <achiang@xxxxxx>

Unpopulated device_node slots do not have children, and attempting to
dereference them will result in a panic.

Instead, attempt to derive the PCI slot number from the bus itself, and
failing that, default to 0.

Signed-off-by: Alex Chiang <achiang@xxxxxx>
Cc: Matthew Wilcox <matthew@xxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: Kristen Carlson Accardi <kristen.c.accardi@xxxxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>
Tested-by: Badari Pulavarty <pbadari@xxxxxxxxxx>
Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/pci/hotplug/rpaphp_slot.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff -puN drivers/pci/hotplug/rpaphp_slot.c~pci-hotplug-introduce-pci_slot-rpaphp-correctly-call-pci_hp_register-for-empty-pci-slots drivers/pci/hotplug/rpaphp_slot.c
--- a/drivers/pci/hotplug/rpaphp_slot.c~pci-hotplug-introduce-pci_slot-rpaphp-correctly-call-pci_hp_register-for-empty-pci-slots
+++ a/drivers/pci/hotplug/rpaphp_slot.c
@@ -121,6 +121,7 @@ int rpaphp_register_slot(struct slot *sl
 {
 	struct hotplug_slot *php_slot = slot->hotplug_slot;
 	int retval;
+	int slot_nr;
 
 	dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", 
 		__func__, slot->dn->full_name, slot->index, slot->name,
@@ -132,8 +133,11 @@ int rpaphp_register_slot(struct slot *sl
 		return -EAGAIN;
 	}	
 
-	retval = pci_hp_register(php_slot, slot->bus,
-				 PCI_SLOT(PCI_DN(slot->dn->child)->devfn));
+	if (slot->bus->self)
+		slot_nr = PCI_SLOT(slot->bus->self->devfn);
+	else
+		slot_nr = 0;
+	retval = pci_hp_register(php_slot, slot->bus, slot_nr);
 	if (retval) {
 		err("pci_hp_register failed with error %d\n", retval);
 		return retval;
_

Patches currently in -mm which might be from achiang@xxxxxx are

pci-hotplug-introduce-pci_slot-rpaphp-correctly-call-pci_hp_register-for-empty-pci-slots.patch
pci-hotplug-acpi-pci-slot-detection-driver.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux