Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.2-rc1 65 lines 2.1 kB view raw
1/* 2 * Intel MIC Platform Software Stack (MPSS) 3 * 4 * Copyright(c) 2014 Intel Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License, version 2, as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * General Public License for more details. 14 * 15 * Intel SCIF driver. 16 */ 17#ifndef _SCIF_PEER_BUS_H_ 18#define _SCIF_PEER_BUS_H_ 19 20#include <linux/device.h> 21#include <linux/mic_common.h> 22 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 */ 35struct 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 */ 47struct 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 55struct scif_dev; 56 57int scif_peer_register_driver(struct scif_peer_driver *driver); 58void scif_peer_unregister_driver(struct scif_peer_driver *driver); 59 60struct scif_peer_dev *scif_peer_register_device(struct scif_dev *sdev); 61void scif_peer_unregister_device(struct scif_peer_dev *sdev); 62 63int scif_peer_bus_init(void); 64void scif_peer_bus_exit(void); 65#endif /* _SCIF_PEER_BUS_H */