diff options
Diffstat (limited to 'drivers/misc/mic/scif/scif_peer_bus.h')
-rw-r--r-- | drivers/misc/mic/scif/scif_peer_bus.h | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/drivers/misc/mic/scif/scif_peer_bus.h b/drivers/misc/mic/scif/scif_peer_bus.h index 33f0dbb30152..a3b8dd2edaa5 100644 --- a/drivers/misc/mic/scif/scif_peer_bus.h +++ b/drivers/misc/mic/scif/scif_peer_bus.h | |||
@@ -19,47 +19,13 @@ | |||
19 | 19 | ||
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/mic_common.h> | 21 | #include <linux/mic_common.h> |
22 | 22 | #include <linux/scif.h> | |
23 | /* | ||
24 | * Peer devices show up as PCIe devices for the mgmt node but not the cards. | ||
25 | * The mgmt node discovers all the cards on the PCIe bus and informs the other | ||
26 | * cards about their peers. Upon notification of a peer a node adds a peer | ||
27 | * device to the peer bus to maintain symmetry in the way devices are | ||
28 | * discovered across all nodes in the SCIF network. | ||
29 | */ | ||
30 | /** | ||
31 | * scif_peer_dev - representation of a peer SCIF device | ||
32 | * @dev: underlying device | ||
33 | * @dnode - The destination node which this device will communicate with. | ||
34 | */ | ||
35 | struct scif_peer_dev { | ||
36 | struct device dev; | ||
37 | u8 dnode; | ||
38 | }; | ||
39 | |||
40 | /** | ||
41 | * scif_peer_driver - operations for a scif_peer I/O driver | ||
42 | * @driver: underlying device driver (populate name and owner). | ||
43 | * @id_table: the ids serviced by this driver. | ||
44 | * @probe: the function to call when a device is found. Returns 0 or -errno. | ||
45 | * @remove: the function to call when a device is removed. | ||
46 | */ | ||
47 | struct scif_peer_driver { | ||
48 | struct device_driver driver; | ||
49 | const struct scif_peer_dev_id *id_table; | ||
50 | |||
51 | int (*probe)(struct scif_peer_dev *dev); | ||
52 | void (*remove)(struct scif_peer_dev *dev); | ||
53 | }; | ||
54 | 23 | ||
55 | struct scif_dev; | 24 | struct scif_dev; |
56 | 25 | ||
57 | int scif_peer_register_driver(struct scif_peer_driver *driver); | 26 | void scif_add_peer_device(struct work_struct *work); |
58 | void scif_peer_unregister_driver(struct scif_peer_driver *driver); | 27 | void scif_peer_register_device(struct scif_dev *sdev); |
59 | 28 | int scif_peer_unregister_device(struct scif_dev *scifdev); | |
60 | struct scif_peer_dev *scif_peer_register_device(struct scif_dev *sdev); | ||
61 | void scif_peer_unregister_device(struct scif_peer_dev *sdev); | ||
62 | |||
63 | int scif_peer_bus_init(void); | 29 | int scif_peer_bus_init(void); |
64 | void scif_peer_bus_exit(void); | 30 | void scif_peer_bus_exit(void); |
65 | #endif /* _SCIF_PEER_BUS_H */ | 31 | #endif /* _SCIF_PEER_BUS_H */ |