Skip to contentSkip to conversation

rpaphp_add_slot.patch

PATH Applied Linda Xie 2 participants 2 messages Jul 2, 2004 – Jul 14, 2004

Subsystems (3)
lore
Share & tools
lore

Linda Xie

author
#0 lore raw

Hi Greg,

I found a bug in rpaphp code during DLPAR I/O testing. When DLPAR ADD a non-empty I/O slot to a partition, an adapter in the slot didn't get configured. The attached patch fixes that. Please review and apply if there are no objections.

Thanks,

Linda

drivers/pci/hotplug/rpaphp_pci.c +18 -3
diff -Nru a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
@@ -340,7 +340,6 @@
 	return rc;
 }
 
-
 static void rpaphp_eeh_remove_bus_device(struct pci_dev *dev)
 {
 	eeh_remove_device(dev);
@@ -429,10 +428,26 @@
 				__FUNCTION__, slot->name);
 			goto exit_rc;
 		}
-		if (init_slot_pci_funcs(slot)) {
-			err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
+
+		if (slot->hotplug_slot->info->adapter_status == NOT_CONFIGURED) {
+			dbg("%s CONFIGURING pci adapter in slot[%s]\n",  
+				__FUNCTION__, slot->name);
+			if (rpaphp_config_pci_adapter(slot)) {
+				err("%s: CONFIG pci adapter failed\n", __FUNCTION__);
+				goto exit_rc;		
+			}
+		} else if (slot->hotplug_slot->info->adapter_status == CONFIGURED) {
+			if (init_slot_pci_funcs(slot)) {
+				err("%s: init_slot_pci_funcs failed\n", __FUNCTION__);
+				goto exit_rc;
+			}
+
+		} else {
+			err("%s: slot[%s]'s adapter_status is NOT_VALID.\n",
+				__FUNCTION__, slot->name);
 			goto exit_rc;
 		}
+		
 		print_slot_pci_funcs(slot);
 		if (!list_empty(&slot->dev.pci_funcs)) {
 			slot->state = CONFIGURED;
Applied
#1 lore raw
Quoted 8 lines · Linda Xie

Hi Greg,

I found a bug in rpaphp code during DLPAR I/O testing. When DLPAR ADD
a non-empty I/O slot to a partition, an adapter in the slot didn't get configured. The attached patch fixes that. Please review and apply if there are no objections.

Applied, thanks.

greg k-h