Lines Matching refs:slot

37 struct slot {  struct
43 static inline int slot_configure(struct slot *slot) in slot_configure() argument
45 int ret = sclp_pci_configure(slot->zdev->fid); in slot_configure()
47 zpci_dbg(3, "conf fid:%x, rc:%d\n", slot->zdev->fid, ret); in slot_configure()
49 slot->zdev->state = ZPCI_FN_STATE_CONFIGURED; in slot_configure()
54 static inline int slot_deconfigure(struct slot *slot) in slot_deconfigure() argument
56 int ret = sclp_pci_deconfigure(slot->zdev->fid); in slot_deconfigure()
58 zpci_dbg(3, "deconf fid:%x, rc:%d\n", slot->zdev->fid, ret); in slot_deconfigure()
60 slot->zdev->state = ZPCI_FN_STATE_STANDBY; in slot_deconfigure()
67 struct slot *slot = hotplug_slot->private; in enable_slot() local
70 if (slot->zdev->state != ZPCI_FN_STATE_STANDBY) in enable_slot()
73 rc = slot_configure(slot); in enable_slot()
77 rc = zpci_enable_device(slot->zdev); in enable_slot()
81 pci_scan_slot(slot->zdev->bus, ZPCI_DEVFN); in enable_slot()
83 pci_bus_add_devices(slot->zdev->bus); in enable_slot()
89 slot_deconfigure(slot); in enable_slot()
95 struct slot *slot = hotplug_slot->private; in disable_slot() local
98 if (!zpci_fn_configured(slot->zdev->state)) in disable_slot()
101 if (slot->zdev->pdev) in disable_slot()
102 pci_stop_and_remove_bus_device_locked(slot->zdev->pdev); in disable_slot()
104 rc = zpci_disable_device(slot->zdev); in disable_slot()
108 return slot_deconfigure(slot); in disable_slot()
113 struct slot *slot = hotplug_slot->private; in get_power_status() local
115 switch (slot->zdev->state) { in get_power_status()
135 struct slot *slot = hotplug_slot->private; in release_slot() local
137 kfree(slot->hotplug_slot->info); in release_slot()
138 kfree(slot->hotplug_slot); in release_slot()
139 kfree(slot); in release_slot()
154 struct slot *slot; in zpci_init_slot() local
160 slot = kzalloc(sizeof(*slot), GFP_KERNEL); in zpci_init_slot()
161 if (!slot) in zpci_init_slot()
167 hotplug_slot->private = slot; in zpci_init_slot()
169 slot->hotplug_slot = hotplug_slot; in zpci_init_slot()
170 slot->zdev = zdev; in zpci_init_slot()
184 rc = pci_hp_register(slot->hotplug_slot, zdev->bus, in zpci_init_slot()
189 list_add(&slot->slot_list, &s390_hotplug_slot_list); in zpci_init_slot()
197 kfree(slot); in zpci_init_slot()
205 struct slot *slot; in zpci_exit_slot() local
208 slot = list_entry(tmp, struct slot, slot_list); in zpci_exit_slot()
209 if (slot->zdev != zdev) in zpci_exit_slot()
211 list_del(&slot->slot_list); in zpci_exit_slot()
212 pci_hp_deregister(slot->hotplug_slot); in zpci_exit_slot()