0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops);
0011 void zpci_bus_device_unregister(struct zpci_dev *zdev);
0012
0013 int zpci_bus_scan_bus(struct zpci_bus *zbus);
0014 void zpci_bus_scan_busses(void);
0015
0016 int zpci_bus_scan_device(struct zpci_dev *zdev);
0017 void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);
0018
0019 void zpci_release_device(struct kref *kref);
0020 static inline void zpci_zdev_put(struct zpci_dev *zdev)
0021 {
0022 if (zdev)
0023 kref_put(&zdev->kref, zpci_release_device);
0024 }
0025
0026 static inline void zpci_zdev_get(struct zpci_dev *zdev)
0027 {
0028 kref_get(&zdev->kref);
0029 }
0030
0031 int zpci_alloc_domain(int domain);
0032 void zpci_free_domain(int domain);
0033 int zpci_setup_bus_resources(struct zpci_dev *zdev,
0034 struct list_head *resources);
0035
0036 static inline struct zpci_dev *zdev_from_bus(struct pci_bus *bus,
0037 unsigned int devfn)
0038 {
0039 struct zpci_bus *zbus = bus->sysdata;
0040
0041 return (devfn >= ZPCI_FUNCTIONS_PER_BUS) ? NULL : zbus->function[devfn];
0042 }
0043