Lines Matching refs:zdev
132 struct zpci_dev *zdev = to_zpci(pdev); in pcibios_bus_add_device() local
138 if (zdev->vfn) { in pcibios_bus_add_device()
139 zpci_iov_setup_virtfn(zdev->zbus, pdev, zdev->vfn); in pcibios_bus_add_device()
144 static int zpci_bus_add_device(struct zpci_bus *zbus, struct zpci_dev *zdev) in zpci_bus_add_device() argument
156 pdev = pci_get_slot(bus, zdev->devfn); in zpci_bus_add_device()
163 rc = zpci_init_slot(zdev); in zpci_bus_add_device()
166 zdev->has_hp_slot = 1; in zpci_bus_add_device()
173 pdev = pci_scan_single_device(bus, zdev->devfn); in zpci_bus_add_device()
193 int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops) in zpci_bus_device_register() argument
200 zdev->fid, ZPCI_NR_DEVICES); in zpci_bus_device_register()
205 if (zdev->devfn >= ZPCI_FUNCTIONS_PER_BUS) in zpci_bus_device_register()
208 if (!s390_pci_no_rid && zdev->rid_available) in zpci_bus_device_register()
209 zbus = zpci_bus_get(zdev->pchid); in zpci_bus_device_register()
212 zbus = zpci_bus_alloc(zdev->pchid); in zpci_bus_device_register()
217 zdev->zbus = zbus; in zpci_bus_device_register()
218 if (zbus->function[zdev->devfn]) { in zpci_bus_device_register()
219 pr_err("devfn %04x is already assigned\n", zdev->devfn); in zpci_bus_device_register()
222 zbus->function[zdev->devfn] = zdev; in zpci_bus_device_register()
224 zpci_setup_bus_resources(zdev, &zbus->resources); in zpci_bus_device_register()
231 if (!zdev->rid_available) { in zpci_bus_device_register()
235 rc = zpci_bus_add_device(zbus, zdev); in zpci_bus_device_register()
238 } else if (zdev->devfn == 0) { in zpci_bus_device_register()
239 if (zbus->multifunction && !zdev->rid_available) { in zpci_bus_device_register()
243 rc = zpci_bus_scan(zbus, (u16)zdev->uid, ops); in zpci_bus_device_register()
247 rc = zpci_init_slot(zdev); in zpci_bus_device_register()
250 zdev->has_hp_slot = 1; in zpci_bus_device_register()
251 zbus->multifunction = zdev->rid_available; in zpci_bus_device_register()
252 zbus->max_bus_speed = zdev->max_bus_speed; in zpci_bus_device_register()
261 zbus->function[zdev->devfn] = NULL; in zpci_bus_device_register()
263 pr_err("Adding PCI function %08x failed\n", zdev->fid); in zpci_bus_device_register()
268 void zpci_bus_device_unregister(struct zpci_dev *zdev) in zpci_bus_device_unregister() argument
270 struct zpci_bus *zbus = zdev->zbus; in zpci_bus_device_unregister()
273 zbus->function[zdev->devfn] = NULL; in zpci_bus_device_unregister()