Lines Matching refs:zdev
51 struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid); in __zpci_event_error() local
57 if (zdev) in __zpci_event_error()
58 pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); in __zpci_event_error()
69 zpci_zdev_put(zdev); in __zpci_event_error()
80 struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid); in __zpci_event_availability() local
81 bool existing_zdev = !!zdev; in __zpci_event_availability()
91 if (!zdev) { in __zpci_event_availability()
96 if (zdev->state != ZPCI_FN_STATE_STANDBY) in __zpci_event_availability()
98 zdev->fh = ccdf->fh; in __zpci_event_availability()
99 zdev->state = ZPCI_FN_STATE_CONFIGURED; in __zpci_event_availability()
100 ret = zpci_enable_device(zdev); in __zpci_event_availability()
105 if (!zdev->zbus->bus) in __zpci_event_availability()
108 pdev = pci_scan_single_device(zdev->zbus->bus, zdev->devfn); in __zpci_event_availability()
114 pci_bus_add_devices(zdev->zbus->bus); in __zpci_event_availability()
118 if (!zdev) { in __zpci_event_availability()
122 zdev->fh = ccdf->fh; in __zpci_event_availability()
125 if (!zdev) in __zpci_event_availability()
127 zpci_remove_device(zdev, false); in __zpci_event_availability()
129 ret = zpci_disable_device(zdev); in __zpci_event_availability()
133 ret = sclp_pci_deconfigure(zdev->fid); in __zpci_event_availability()
134 zpci_dbg(3, "deconf fid:%x, rc:%d\n", zdev->fid, ret); in __zpci_event_availability()
136 zdev->state = ZPCI_FN_STATE_STANDBY; in __zpci_event_availability()
140 if (!zdev) in __zpci_event_availability()
145 zpci_remove_device(zdev, true); in __zpci_event_availability()
147 zdev->fh = ccdf->fh; in __zpci_event_availability()
148 zpci_disable_device(zdev); in __zpci_event_availability()
149 zdev->state = ZPCI_FN_STATE_STANDBY; in __zpci_event_availability()
152 zpci_device_reserved(zdev); in __zpci_event_availability()
160 if (!zdev) in __zpci_event_availability()
162 zpci_device_reserved(zdev); in __zpci_event_availability()
168 zpci_zdev_put(zdev); in __zpci_event_availability()