Go to the documentation of this file.
18 #ifndef _VNIC_DEVCMD_H_
19 #define _VNIC_DEVCMD_H_
22 #define _CMD_VTYPEBITS 10
23 #define _CMD_FLAGSBITS 6
24 #define _CMD_DIRBITS 2
26 #define _CMD_NMASK ((1 << _CMD_NBITS)-1)
27 #define _CMD_VTYPEMASK ((1 << _CMD_VTYPEBITS)-1)
28 #define _CMD_FLAGSMASK ((1 << _CMD_FLAGSBITS)-1)
29 #define _CMD_DIRMASK ((1 << _CMD_DIRBITS)-1)
32 #define _CMD_VTYPESHIFT (_CMD_NSHIFT+_CMD_NBITS)
33 #define _CMD_FLAGSSHIFT (_CMD_VTYPESHIFT+_CMD_VTYPEBITS)
34 #define _CMD_DIRSHIFT (_CMD_FLAGSSHIFT+_CMD_FLAGSBITS)
39 #define _CMD_DIR_NONE 0U
40 #define _CMD_DIR_WRITE 1U
41 #define _CMD_DIR_READ 2U
42 #define _CMD_DIR_RW (_CMD_DIR_WRITE | _CMD_DIR_READ)
47 #define _CMD_FLAGS_NONE 0U
48 #define _CMD_FLAGS_NOWAIT 1U
53 #define _CMD_VTYPE_NONE 0U
54 #define _CMD_VTYPE_ENET 1U
55 #define _CMD_VTYPE_FC 2U
56 #define _CMD_VTYPE_SCSI 4U
57 #define _CMD_VTYPE_ALL (_CMD_VTYPE_ENET | _CMD_VTYPE_FC | _CMD_VTYPE_SCSI)
62 #define _CMDCF(dir, flags, vtype, nr) \
63 (((dir) << _CMD_DIRSHIFT) | \
64 ((flags) << _CMD_FLAGSSHIFT) | \
65 ((vtype) << _CMD_VTYPESHIFT) | \
66 ((nr) << _CMD_NSHIFT))
67 #define _CMDC(dir, vtype, nr) _CMDCF(dir, 0, vtype, nr)
68 #define _CMDCNW(dir, vtype, nr) _CMDCF(dir, _CMD_FLAGS_NOWAIT, vtype, nr)
73 #define _CMD_DIR(cmd) (((cmd) >> _CMD_DIRSHIFT) & _CMD_DIRMASK)
74 #define _CMD_FLAGS(cmd) (((cmd) >> _CMD_FLAGSSHIFT) & _CMD_FLAGSMASK)
75 #define _CMD_VTYPE(cmd) (((cmd) >> _CMD_VTYPESHIFT) & _CMD_VTYPEMASK)
76 #define _CMD_N(cmd) (((cmd) >> _CMD_NSHIFT) & _CMD_NMASK)
202 #define CMD_OPENF_OPROM 0x1
205 #define CMD_INITF_DEFAULT_MAC 0x1
208 #define CMD_PFILTER_DIRECTED 0x01
209 #define CMD_PFILTER_MULTICAST 0x02
210 #define CMD_PFILTER_BROADCAST 0x04
211 #define CMD_PFILTER_PROMISCUOUS 0x08
212 #define CMD_PFILTER_ALL_MULTICAST 0x10
252 #define VNIC_STF_FATAL_ERR 0x0001
274 #define VNIC_DEVCMD_NARGS 15