Lines Matching full:slot

31  * struct slot - slot information for each *physical* slot
33 struct slot { struct
39 static inline struct slot *to_slot(struct hotplug_slot *hotplug_slot) in to_slot() argument
41 return container_of(hotplug_slot, struct slot, hotplug_slot); in to_slot()
44 static inline int slot_configure(struct slot *slot) in slot_configure() argument
46 int ret = sclp_pci_configure(slot->zdev->fid); in slot_configure()
48 zpci_dbg(3, "conf fid:%x, rc:%d\n", slot->zdev->fid, ret); in slot_configure()
50 slot->zdev->state = ZPCI_FN_STATE_CONFIGURED; in slot_configure()
55 static inline int slot_deconfigure(struct slot *slot) in slot_deconfigure() argument
57 int ret = sclp_pci_deconfigure(slot->zdev->fid); in slot_deconfigure()
59 zpci_dbg(3, "deconf fid:%x, rc:%d\n", slot->zdev->fid, ret); in slot_deconfigure()
61 slot->zdev->state = ZPCI_FN_STATE_STANDBY; in slot_deconfigure()
68 struct slot *slot = to_slot(hotplug_slot); in enable_slot() local
71 if (slot->zdev->state != ZPCI_FN_STATE_STANDBY) in enable_slot()
74 rc = slot_configure(slot); in enable_slot()
78 rc = zpci_enable_device(slot->zdev); in enable_slot()
82 pci_scan_slot(slot->zdev->bus, ZPCI_DEVFN); in enable_slot()
84 pci_bus_add_devices(slot->zdev->bus); in enable_slot()
90 slot_deconfigure(slot); in enable_slot()
96 struct slot *slot = to_slot(hotplug_slot); in disable_slot() local
100 if (!zpci_fn_configured(slot->zdev->state)) in disable_slot()
103 pdev = pci_get_slot(slot->zdev->bus, ZPCI_DEVFN); in disable_slot()
109 rc = zpci_disable_device(slot->zdev); in disable_slot()
113 return slot_deconfigure(slot); in disable_slot()
118 struct slot *slot = to_slot(hotplug_slot); in get_power_status() local
120 switch (slot->zdev->state) { in get_power_status()
133 /* if the slot exits it always contains a function */ in get_adapter_status()
148 struct slot *slot; in zpci_init_slot() local
154 slot = kzalloc(sizeof(*slot), GFP_KERNEL); in zpci_init_slot()
155 if (!slot) in zpci_init_slot()
158 slot->zdev = zdev; in zpci_init_slot()
159 slot->hotplug_slot.ops = &s390_hotplug_slot_ops; in zpci_init_slot()
162 rc = pci_hp_register(&slot->hotplug_slot, zdev->bus, in zpci_init_slot()
167 list_add(&slot->slot_list, &s390_hotplug_slot_list); in zpci_init_slot()
171 kfree(slot); in zpci_init_slot()
178 struct slot *slot, *next; in zpci_exit_slot() local
180 list_for_each_entry_safe(slot, next, &s390_hotplug_slot_list, in zpci_exit_slot()
182 if (slot->zdev != zdev) in zpci_exit_slot()
184 list_del(&slot->slot_list); in zpci_exit_slot()
185 pci_hp_deregister(&slot->hotplug_slot); in zpci_exit_slot()
186 kfree(slot); in zpci_exit_slot()