Lines Matching refs:slot

72 static int __rpaphp_get_sensor_state(struct slot *slot, int *state)
78 struct pci_controller *phb = PCI_DN(slot->dn)->phb;
84 * Fallback to existing method for empty slot or PE isn't in EEH
95 slot->index);
99 return rtas_get_sensor(DR_ENTITY_SENSE, slot->index, state);
102 int rpaphp_get_sensor_state(struct slot *slot, int *state)
107 rc = __rpaphp_get_sensor_state(slot, state);
111 dbg("%s: slot must be power up to get sensor-state\n",
117 rc = rtas_set_power_level(slot->power_domain, POWER_ON,
120 dbg("%s: power on slot[%s] failed rc=%d.\n",
121 __func__, slot->name, rc);
123 rc = __rpaphp_get_sensor_state(slot, state);
126 info("%s: slot is unusable\n", __func__);
134 * rpaphp_enable_slot - record slot state, config pci device
135 * @slot: target &slot
137 * Initialize values in the slot structure to indicate if there is a pci card
138 * plugged into the slot. If the slot is not empty, run the pcibios routine
141 int rpaphp_enable_slot(struct slot *slot)
146 slot->state = EMPTY;
148 /* Find out if the power is turned on for the slot */
149 rc = rtas_get_power_level(slot->power_domain, &level);
153 /* Figure out if there is an adapter in the slot */
154 rc = rpaphp_get_sensor_state(slot, &state);
158 bus = pci_find_bus_by_node(slot->dn);
160 err("%s: no pci_bus for dn %pOF\n", __func__, slot->dn);
164 slot->bus = bus;
165 slot->pci_devs = &bus->devices;
167 /* if there's an adapter in the slot, go add the pci devices */
169 slot->state = NOT_CONFIGURED;
171 /* non-empty slot has to have child */
172 if (!slot->dn->child) {
173 err("%s: slot[%s]'s device_node doesn't have child for adapter\n",
174 __func__, slot->name);
179 pseries_eeh_init_edev_recursive(PCI_DN(slot->dn));
184 slot->state = CONFIGURED;
189 dbg("%s: pci_devs of slot[%pOF]\n", __func__, slot->dn);