.. | .. |
---|
54 | 54 | * rpaphp_enable_slot - record slot state, config pci device |
---|
55 | 55 | * @slot: target &slot |
---|
56 | 56 | * |
---|
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 |
---|
60 | 59 | * to get pcibios stuff correctly set up. |
---|
61 | 60 | */ |
---|
62 | 61 | int rpaphp_enable_slot(struct slot *slot) |
---|
63 | 62 | { |
---|
64 | 63 | int rc, level, state; |
---|
65 | 64 | struct pci_bus *bus; |
---|
66 | | - struct hotplug_slot_info *info = slot->hotplug_slot->info; |
---|
67 | 65 | |
---|
68 | | - info->adapter_status = NOT_VALID; |
---|
69 | 66 | slot->state = EMPTY; |
---|
70 | 67 | |
---|
71 | 68 | /* Find out if the power is turned on for the slot */ |
---|
72 | 69 | rc = rtas_get_power_level(slot->power_domain, &level); |
---|
73 | 70 | if (rc) |
---|
74 | 71 | return rc; |
---|
75 | | - info->power_status = level; |
---|
76 | 72 | |
---|
77 | 73 | /* Figure out if there is an adapter in the slot */ |
---|
78 | 74 | rc = rpaphp_get_sensor_state(slot, &state); |
---|
.. | .. |
---|
85 | 81 | return -EINVAL; |
---|
86 | 82 | } |
---|
87 | 83 | |
---|
88 | | - info->adapter_status = EMPTY; |
---|
89 | 84 | slot->bus = bus; |
---|
90 | 85 | slot->pci_devs = &bus->devices; |
---|
91 | 86 | |
---|
92 | 87 | /* if there's an adapter in the slot, go add the pci devices */ |
---|
93 | 88 | if (state == PRESENT) { |
---|
94 | | - info->adapter_status = NOT_CONFIGURED; |
---|
95 | 89 | slot->state = NOT_CONFIGURED; |
---|
96 | 90 | |
---|
97 | 91 | /* non-empty slot has to have child */ |
---|
.. | .. |
---|
101 | 95 | return -EINVAL; |
---|
102 | 96 | } |
---|
103 | 97 | |
---|
104 | | - if (list_empty(&bus->devices)) |
---|
| 98 | + if (list_empty(&bus->devices)) { |
---|
| 99 | + pseries_eeh_init_edev_recursive(PCI_DN(slot->dn)); |
---|
105 | 100 | pci_hp_add_devices(bus); |
---|
| 101 | + } |
---|
106 | 102 | |
---|
107 | 103 | if (!list_empty(&bus->devices)) { |
---|
108 | | - info->adapter_status = CONFIGURED; |
---|
109 | 104 | slot->state = CONFIGURED; |
---|
110 | 105 | } |
---|
111 | 106 | |
---|