Go to the documentation of this file.
4 #include <linux/kernel.h>
5 #include <linux/device.h>
10 #include <linux/list.h>
18 #define VIO_TYPE_CTRL 0x01
19 #define VIO_TYPE_DATA 0x02
20 #define VIO_TYPE_ERR 0x04
23 #define VIO_SUBTYPE_INFO 0x01
24 #define VIO_SUBTYPE_ACK 0x02
25 #define VIO_SUBTYPE_NACK 0x04
28 #define VIO_VER_INFO 0x0001
29 #define VIO_ATTR_INFO 0x0002
30 #define VIO_DRING_REG 0x0003
31 #define VIO_DRING_UNREG 0x0004
32 #define VIO_RDX 0x0005
33 #define VIO_PKT_DATA 0x0040
34 #define VIO_DESC_DATA 0x0041
35 #define VIO_DRING_DATA 0x0042
36 #define VNET_MCAST_INFO 0x0101
51 #define VDEV_NETWORK 0x01
52 #define VDEV_NETWORK_SWITCH 0x02
53 #define VDEV_DISK 0x03
54 #define VDEV_DISK_SERVER 0x04
66 #define VIO_TX_DRING 0x0001
67 #define VIO_RX_DRING 0x0002
80 #define VIO_PKT_MODE 0x01
81 #define VIO_DESC_MODE 0x02
82 #define VIO_DRING_MODE 0x03
91 #define VIO_DRING_ACTIVE 0x01
92 #define VIO_DRING_STOPPED 0x02
102 #define VIO_DESC_FREE 0x01
103 #define VIO_DESC_READY 0x02
104 #define VIO_DESC_ACCEPTED 0x03
105 #define VIO_DESC_DONE 0x04
107 #define VIO_ACK_ENABLE 0x01
108 #define VIO_ACK_DISABLE 0x00
119 #define VD_DISK_TYPE_SLICE 0x01
120 #define VD_DISK_TYPE_DISK 0x02
133 #define VD_OP_BREAD 0x01
134 #define VD_OP_BWRITE 0x02
135 #define VD_OP_FLUSH 0x03
136 #define VD_OP_GET_WCE 0x04
137 #define VD_OP_SET_WCE 0x05
138 #define VD_OP_GET_VTOC 0x06
139 #define VD_OP_SET_VTOC 0x07
140 #define VD_OP_GET_DISKGEOM 0x08
141 #define VD_OP_SET_DISKGEOM 0x09
142 #define VD_OP_SCSICMD 0x0a
143 #define VD_OP_GET_DEVID 0x0b
144 #define VD_OP_GET_EFI 0x0c
145 #define VD_OP_SET_EFI 0x0d
156 #define VIO_DISK_VNAME_LEN 8
157 #define VIO_DISK_ALABEL_LEN 128
158 #define VIO_DISK_NUM_PART 8
206 #define VNET_ADDR_ETHERMAC 0x01
214 #define VNET_NUM_MCAST 7
231 #define VIO_MAX_RING_COOKIES 24
262 ((dr->
prod - dr->
cons) & (ring_size - 1)));
265 #define VIO_MAX_TYPE_LEN 32
266 #define VIO_MAX_COMPAT_LEN 64
324 #define VIO_DRIVER_TX_RING 0
325 #define VIO_DRIVER_RX_RING 1
328 #define VIO_HS_INVALID 0x00
329 #define VIO_HS_GOTVERS 0x01
330 #define VIO_HS_GOT_ATTR 0x04
331 #define VIO_HS_SENT_DREG 0x08
332 #define VIO_HS_SENT_RDX 0x10
333 #define VIO_HS_GOT_RDX_ACK 0x20
334 #define VIO_HS_GOT_RDX 0x40
335 #define VIO_HS_SENT_RDX_ACK 0x80
336 #define VIO_HS_COMPLETE (VIO_HS_GOT_RDX_ACK | VIO_HS_SENT_RDX_ACK)
341 #define VIO_DR_STATE_TXREG 0x01
342 #define VIO_DR_STATE_RXREG 0x02
343 #define VIO_DR_STATE_TXREQ 0x10
344 #define VIO_DR_STATE_RXREQ 0x20
347 #define VIO_DEBUG_HS 0x01
348 #define VIO_DEBUG_DATA 0x02
369 #define viodbg(TYPE, f, a...) \
370 do { if (vio->debug & VIO_DEBUG_##TYPE) \
371 printk(KERN_INFO "vio: ID[%lu] " f, \
372 vio->vdev->channel_id, ## a); \
376 const char *mod_name);
380 #define vio_register_driver(driver) \
381 __vio_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)