Lines Matching full:slot
31 * struct slot - slot information for each *physical* slot
33 struct slot { struct
39 static inline int slot_configure(struct slot *slot) in slot_configure() argument
41 int ret = sclp_pci_configure(slot->zdev->fid); in slot_configure()
43 zpci_dbg(3, "conf fid:%x, rc:%d\n", slot->zdev->fid, ret); in slot_configure()
45 slot->zdev->state = ZPCI_FN_STATE_CONFIGURED; in slot_configure()
50 static inline int slot_deconfigure(struct slot *slot) in slot_deconfigure() argument
52 int ret = sclp_pci_deconfigure(slot->zdev->fid); in slot_deconfigure()
54 zpci_dbg(3, "deconf fid:%x, rc:%d\n", slot->zdev->fid, ret); in slot_deconfigure()
56 slot->zdev->state = ZPCI_FN_STATE_STANDBY; in slot_deconfigure()
63 struct slot *slot = hotplug_slot->private; in enable_slot() local
66 if (slot->zdev->state != ZPCI_FN_STATE_STANDBY) in enable_slot()
69 rc = slot_configure(slot); in enable_slot()
73 rc = zpci_enable_device(slot->zdev); in enable_slot()
77 pci_scan_slot(slot->zdev->bus, ZPCI_DEVFN); in enable_slot()
79 pci_bus_add_devices(slot->zdev->bus); in enable_slot()
85 slot_deconfigure(slot); in enable_slot()
91 struct slot *slot = hotplug_slot->private; in disable_slot() local
95 if (!zpci_fn_configured(slot->zdev->state)) in disable_slot()
98 pdev = pci_get_slot(slot->zdev->bus, ZPCI_DEVFN); 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()
128 /* if the slot exits it always contains a function */ in get_adapter_status()
145 struct slot *slot; in zpci_init_slot() local
151 slot = kzalloc(sizeof(*slot), GFP_KERNEL); in zpci_init_slot()
152 if (!slot) in zpci_init_slot()
158 hotplug_slot->private = slot; in zpci_init_slot()
160 slot->hotplug_slot = hotplug_slot; in zpci_init_slot()
161 slot->zdev = zdev; in zpci_init_slot()
174 rc = pci_hp_register(slot->hotplug_slot, zdev->bus, in zpci_init_slot()
179 list_add(&slot->slot_list, &s390_hotplug_slot_list); in zpci_init_slot()
187 kfree(slot); in zpci_init_slot()
194 struct slot *slot, *next; in zpci_exit_slot() local
196 list_for_each_entry_safe(slot, next, &s390_hotplug_slot_list, in zpci_exit_slot()
198 if (slot->zdev != zdev) in zpci_exit_slot()
200 list_del(&slot->slot_list); in zpci_exit_slot()
201 pci_hp_deregister(slot->hotplug_slot); in zpci_exit_slot()
202 kfree(slot->hotplug_slot->info); in zpci_exit_slot()
203 kfree(slot->hotplug_slot); in zpci_exit_slot()
204 kfree(slot); in zpci_exit_slot()