hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/pci/hotplug/rpaphp_pci.c
....@@ -54,25 +54,21 @@
5454 * rpaphp_enable_slot - record slot state, config pci device
5555 * @slot: target &slot
5656 *
57
- * Initialize values in the slot, and the hotplug_slot info
58
- * structures to indicate if there is a pci card plugged into
59
- * the slot. If the slot is not empty, run the pcibios routine
57
+ * Initialize values in the slot structure to indicate if there is a pci card
58
+ * plugged into the slot. If the slot is not empty, run the pcibios routine
6059 * to get pcibios stuff correctly set up.
6160 */
6261 int rpaphp_enable_slot(struct slot *slot)
6362 {
6463 int rc, level, state;
6564 struct pci_bus *bus;
66
- struct hotplug_slot_info *info = slot->hotplug_slot->info;
6765
68
- info->adapter_status = NOT_VALID;
6966 slot->state = EMPTY;
7067
7168 /* Find out if the power is turned on for the slot */
7269 rc = rtas_get_power_level(slot->power_domain, &level);
7370 if (rc)
7471 return rc;
75
- info->power_status = level;
7672
7773 /* Figure out if there is an adapter in the slot */
7874 rc = rpaphp_get_sensor_state(slot, &state);
....@@ -85,13 +81,11 @@
8581 return -EINVAL;
8682 }
8783
88
- info->adapter_status = EMPTY;
8984 slot->bus = bus;
9085 slot->pci_devs = &bus->devices;
9186
9287 /* if there's an adapter in the slot, go add the pci devices */
9388 if (state == PRESENT) {
94
- info->adapter_status = NOT_CONFIGURED;
9589 slot->state = NOT_CONFIGURED;
9690
9791 /* non-empty slot has to have child */
....@@ -101,11 +95,12 @@
10195 return -EINVAL;
10296 }
10397
104
- if (list_empty(&bus->devices))
98
+ if (list_empty(&bus->devices)) {
99
+ pseries_eeh_init_edev_recursive(PCI_DN(slot->dn));
105100 pci_hp_add_devices(bus);
101
+ }
106102
107103 if (!list_empty(&bus->devices)) {
108
- info->adapter_status = CONFIGURED;
109104 slot->state = CONFIGURED;
110105 }
111106