Lines Matching refs:zdev
29 static inline int zdev_configure(struct zpci_dev *zdev) in zdev_configure() argument
31 int ret = sclp_pci_configure(zdev->fid); in zdev_configure()
33 zpci_dbg(3, "conf fid:%x, rc:%d\n", zdev->fid, ret); in zdev_configure()
35 zdev->state = ZPCI_FN_STATE_CONFIGURED; in zdev_configure()
40 static inline int zdev_deconfigure(struct zpci_dev *zdev) in zdev_deconfigure() argument
42 int ret = sclp_pci_deconfigure(zdev->fid); in zdev_deconfigure()
44 zpci_dbg(3, "deconf fid:%x, rc:%d\n", zdev->fid, ret); in zdev_deconfigure()
46 zdev->state = ZPCI_FN_STATE_STANDBY; in zdev_deconfigure()
53 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in enable_slot() local
55 struct zpci_bus *zbus = zdev->zbus; in enable_slot()
58 if (zdev->state != ZPCI_FN_STATE_STANDBY) in enable_slot()
61 rc = zdev_configure(zdev); in enable_slot()
65 rc = zpci_enable_device(zdev); in enable_slot()
69 pci_scan_slot(zbus->bus, zdev->devfn); in enable_slot()
77 zdev_deconfigure(zdev); in enable_slot()
83 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in disable_slot() local
88 if (!zpci_fn_configured(zdev->state)) in disable_slot()
91 pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); in disable_slot()
97 zpci_remove_device(zdev); in disable_slot()
99 rc = zpci_disable_device(zdev); in disable_slot()
103 return zdev_deconfigure(zdev); in disable_slot()
108 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in get_power_status() local
111 switch (zdev->state) { in get_power_status()
136 int zpci_init_slot(struct zpci_dev *zdev) in zpci_init_slot() argument
139 struct zpci_bus *zbus = zdev->zbus; in zpci_init_slot()
141 zdev->hotplug_slot.ops = &s390_hotplug_slot_ops; in zpci_init_slot()
143 snprintf(name, SLOT_NAME_SIZE, "%08x", zdev->fid); in zpci_init_slot()
144 return pci_hp_register(&zdev->hotplug_slot, zbus->bus, in zpci_init_slot()
145 zdev->devfn, name); in zpci_init_slot()
148 void zpci_exit_slot(struct zpci_dev *zdev) in zpci_exit_slot() argument
150 pci_hp_deregister(&zdev->hotplug_slot); in zpci_exit_slot()