Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
vnic_devcmd.h File Reference

Go to the source code of this file.

Data Structures

struct  vnic_devcmd_fw_info
 
struct  vnic_devcmd_notify
 
struct  vnic_devcmd_provinfo
 
struct  vnic_devcmd
 

Macros

#define _CMD_NBITS   14
 
#define _CMD_VTYPEBITS   10
 
#define _CMD_FLAGSBITS   6
 
#define _CMD_DIRBITS   2
 
#define _CMD_NMASK   ((1 << _CMD_NBITS)-1)
 
#define _CMD_VTYPEMASK   ((1 << _CMD_VTYPEBITS)-1)
 
#define _CMD_FLAGSMASK   ((1 << _CMD_FLAGSBITS)-1)
 
#define _CMD_DIRMASK   ((1 << _CMD_DIRBITS)-1)
 
#define _CMD_NSHIFT   0
 
#define _CMD_VTYPESHIFT   (_CMD_NSHIFT+_CMD_NBITS)
 
#define _CMD_FLAGSSHIFT   (_CMD_VTYPESHIFT+_CMD_VTYPEBITS)
 
#define _CMD_DIRSHIFT   (_CMD_FLAGSSHIFT+_CMD_FLAGSBITS)
 
#define _CMD_DIR_NONE   0U
 
#define _CMD_DIR_WRITE   1U
 
#define _CMD_DIR_READ   2U
 
#define _CMD_DIR_RW   (_CMD_DIR_WRITE | _CMD_DIR_READ)
 
#define _CMD_FLAGS_NONE   0U
 
#define _CMD_FLAGS_NOWAIT   1U
 
#define _CMD_VTYPE_NONE   0U
 
#define _CMD_VTYPE_ENET   1U
 
#define _CMD_VTYPE_FC   2U
 
#define _CMD_VTYPE_SCSI   4U
 
#define _CMD_VTYPE_ALL   (_CMD_VTYPE_ENET | _CMD_VTYPE_FC | _CMD_VTYPE_SCSI)
 
#define _CMDCF(dir, flags, vtype, nr)
 
#define _CMDC(dir, vtype, nr)   _CMDCF(dir, 0, vtype, nr)
 
#define _CMDCNW(dir, vtype, nr)   _CMDCF(dir, _CMD_FLAGS_NOWAIT, vtype, nr)
 
#define _CMD_DIR(cmd)   (((cmd) >> _CMD_DIRSHIFT) & _CMD_DIRMASK)
 
#define _CMD_FLAGS(cmd)   (((cmd) >> _CMD_FLAGSSHIFT) & _CMD_FLAGSMASK)
 
#define _CMD_VTYPE(cmd)   (((cmd) >> _CMD_VTYPESHIFT) & _CMD_VTYPEMASK)
 
#define _CMD_N(cmd)   (((cmd) >> _CMD_NSHIFT) & _CMD_NMASK)
 
#define CMD_OPENF_OPROM   0x1 /* open coming from option rom */
 
#define CMD_INITF_DEFAULT_MAC   0x1 /* init with default mac addr */
 
#define CMD_PFILTER_DIRECTED   0x01
 
#define CMD_PFILTER_MULTICAST   0x02
 
#define CMD_PFILTER_BROADCAST   0x04
 
#define CMD_PFILTER_PROMISCUOUS   0x08
 
#define CMD_PFILTER_ALL_MULTICAST   0x10
 
#define VNIC_STF_FATAL_ERR   0x0001 /* fatal fw error */
 
#define VNIC_DEVCMD_NARGS   15
 

Enumerations

enum  vnic_devcmd_cmd {
  CMD_NONE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_NONE, 0), CMD_MCPU_FW_INFO_OLD = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 1), CMD_MCPU_FW_INFO = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 1), CMD_DEV_SPEC = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 2),
  CMD_STATS_CLEAR = _CMDCNW(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 3), CMD_STATS_DUMP = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 4), CMD_PACKET_FILTER = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 7), CMD_PACKET_FILTER_ALL = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 7),
  CMD_HANG_NOTIFY = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 8), CMD_GET_MAC_ADDR, CMD_ADDR_ADD, CMD_ADDR_DEL,
  CMD_VLAN_ADD = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 14), CMD_VLAN_DEL = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 15), CMD_NIC_CFG = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 16), CMD_RSS_KEY = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 17),
  CMD_RSS_CPU = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 18), CMD_SOFT_RESET = _CMDCNW(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 19), CMD_SOFT_RESET_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 20), CMD_NOTIFY = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 21),
  CMD_UNDI = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 22), CMD_OPEN = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 23), CMD_OPEN_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 24), CMD_CLOSE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 25),
  CMD_INIT_v1 = _CMDCNW(_CMD_DIR_READ, _CMD_VTYPE_ALL, 26), CMD_INIT_PROV_INFO = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 27), CMD_ENABLE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 28), CMD_ENABLE_WAIT = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 28),
  CMD_DISABLE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 29), CMD_STATS_DUMP_ALL = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 30), CMD_INIT_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 31), CMD_INT13 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_FC, 32),
  CMD_LOGICAL_UPLINK = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 33), CMD_DEINIT = _CMDCNW(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 34), CMD_INIT = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 35), CMD_CAPABILITY = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 36),
  CMD_PERBI = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_FC, 37), CMD_IAR = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 38), CMD_HANG_RESET = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 39), CMD_HANG_RESET_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 40),
  CMD_IG_VLAN_REWRITE_MODE = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ENET, 41), CMD_PROXY_BY_BDF = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 42), CMD_PROXY_BY_INDEX = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 43), CMD_CONFIG_INFO_GET = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 44),
  CMD_INIT_PROV_INFO2 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 47), CMD_ENABLE2 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 48), CMD_STATUS = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 49), CMD_INTR_COAL_CONVERT = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 50),
  CMD_SET_MAC_ADDR = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 55), CMD_NONE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_NONE, 0), CMD_MCPU_FW_INFO = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 1), CMD_DEV_SPEC = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 2),
  CMD_STATS_CLEAR = _CMDCNW(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 3), CMD_STATS_DUMP = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 4), CMD_PACKET_FILTER = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 7), CMD_HANG_NOTIFY = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 8),
  CMD_MAC_ADDR, CMD_PROMISC_MODE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 10), CMD_ALLMULTI_MODE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 11), CMD_ADDR_ADD,
  CMD_ADDR_DEL, CMD_VLAN_ADD = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 14), CMD_VLAN_DEL = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 15), CMD_NIC_CFG = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 16),
  CMD_RSS_KEY = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 17), CMD_RSS_CPU = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 18), CMD_SOFT_RESET = _CMDCNW(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 19), CMD_SOFT_RESET_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 20),
  CMD_NOTIFY = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 21), CMD_UNDI = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 22), CMD_OPEN = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 23), CMD_OPEN_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 24),
  CMD_CLOSE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 25), CMD_INIT = _CMDCNW(_CMD_DIR_READ, _CMD_VTYPE_ALL, 26), CMD_INIT_PROV_INFO = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 27), CMD_ENABLE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 28),
  CMD_DISABLE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 29), CMD_STATS_DUMP_ALL = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 30), CMD_INIT_STATUS = _CMDC(_CMD_DIR_READ, _CMD_VTYPE_ALL, 31), CMD_INT13 = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_FC, 32),
  CMD_LOGICAL_UPLINK = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 33), CMD_DEINIT = _CMDCNW(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 34)
}
 
enum  vnic_devcmd_status {
  STAT_NONE = 0, STAT_BUSY = 1 << 0, STAT_ERROR = 1 << 1, STAT_NONE = 0,
  STAT_BUSY = 1 << 0, STAT_ERROR = 1 << 1
}
 
enum  vnic_devcmd_error {
  ERR_SUCCESS = 0, ERR_EINVAL = 1, ERR_EFAULT = 2, ERR_EPERM = 3,
  ERR_EBUSY = 4, ERR_ECMDUNKNOWN = 5, ERR_EBADSTATE = 6, ERR_ENOMEM = 7,
  ERR_ETIMEDOUT = 8, ERR_ELINKDOWN = 9, ERR_EMAXRES = 10, ERR_ENOTSUPPORTED = 11,
  ERR_EINPROGRESS = 12, ERR_SUCCESS = 0, ERR_EINVAL = 1, ERR_EFAULT = 2,
  ERR_EPERM = 3, ERR_EBUSY = 4, ERR_ECMDUNKNOWN = 5, ERR_EBADSTATE = 6,
  ERR_ENOMEM = 7, ERR_ETIMEDOUT = 8, ERR_ELINKDOWN = 9
}
 

Macro Definition Documentation

#define _CMD_DIR (   cmd)    (((cmd) >> _CMD_DIRSHIFT) & _CMD_DIRMASK)

Definition at line 73 of file vnic_devcmd.h.

#define _CMD_DIR_NONE   0U

Definition at line 39 of file vnic_devcmd.h.

#define _CMD_DIR_READ   2U

Definition at line 41 of file vnic_devcmd.h.

#define _CMD_DIR_RW   (_CMD_DIR_WRITE | _CMD_DIR_READ)

Definition at line 42 of file vnic_devcmd.h.

#define _CMD_DIR_WRITE   1U

Definition at line 40 of file vnic_devcmd.h.

#define _CMD_DIRBITS   2

Definition at line 24 of file vnic_devcmd.h.

#define _CMD_DIRMASK   ((1 << _CMD_DIRBITS)-1)

Definition at line 29 of file vnic_devcmd.h.

#define _CMD_DIRSHIFT   (_CMD_FLAGSSHIFT+_CMD_FLAGSBITS)

Definition at line 34 of file vnic_devcmd.h.

#define _CMD_FLAGS (   cmd)    (((cmd) >> _CMD_FLAGSSHIFT) & _CMD_FLAGSMASK)

Definition at line 74 of file vnic_devcmd.h.

#define _CMD_FLAGS_NONE   0U

Definition at line 47 of file vnic_devcmd.h.

#define _CMD_FLAGS_NOWAIT   1U

Definition at line 48 of file vnic_devcmd.h.

#define _CMD_FLAGSBITS   6

Definition at line 23 of file vnic_devcmd.h.

#define _CMD_FLAGSMASK   ((1 << _CMD_FLAGSBITS)-1)

Definition at line 28 of file vnic_devcmd.h.

#define _CMD_FLAGSSHIFT   (_CMD_VTYPESHIFT+_CMD_VTYPEBITS)

Definition at line 33 of file vnic_devcmd.h.

#define _CMD_N (   cmd)    (((cmd) >> _CMD_NSHIFT) & _CMD_NMASK)

Definition at line 76 of file vnic_devcmd.h.

#define _CMD_NBITS   14

Definition at line 21 of file vnic_devcmd.h.

#define _CMD_NMASK   ((1 << _CMD_NBITS)-1)

Definition at line 26 of file vnic_devcmd.h.

#define _CMD_NSHIFT   0

Definition at line 31 of file vnic_devcmd.h.

#define _CMD_VTYPE (   cmd)    (((cmd) >> _CMD_VTYPESHIFT) & _CMD_VTYPEMASK)

Definition at line 75 of file vnic_devcmd.h.

#define _CMD_VTYPE_ALL   (_CMD_VTYPE_ENET | _CMD_VTYPE_FC | _CMD_VTYPE_SCSI)

Definition at line 57 of file vnic_devcmd.h.

#define _CMD_VTYPE_ENET   1U

Definition at line 54 of file vnic_devcmd.h.

#define _CMD_VTYPE_FC   2U

Definition at line 55 of file vnic_devcmd.h.

#define _CMD_VTYPE_NONE   0U

Definition at line 53 of file vnic_devcmd.h.

#define _CMD_VTYPE_SCSI   4U

Definition at line 56 of file vnic_devcmd.h.

#define _CMD_VTYPEBITS   10

Definition at line 22 of file vnic_devcmd.h.

#define _CMD_VTYPEMASK   ((1 << _CMD_VTYPEBITS)-1)

Definition at line 27 of file vnic_devcmd.h.

#define _CMD_VTYPESHIFT   (_CMD_NSHIFT+_CMD_NBITS)

Definition at line 32 of file vnic_devcmd.h.

#define _CMDC (   dir,
  vtype,
  nr 
)    _CMDCF(dir, 0, vtype, nr)

Definition at line 67 of file vnic_devcmd.h.

#define _CMDCF (   dir,
  flags,
  vtype,
  nr 
)
Value:
(((dir) << _CMD_DIRSHIFT) | \
((nr) << _CMD_NSHIFT))

Definition at line 62 of file vnic_devcmd.h.

#define _CMDCNW (   dir,
  vtype,
  nr 
)    _CMDCF(dir, _CMD_FLAGS_NOWAIT, vtype, nr)

Definition at line 68 of file vnic_devcmd.h.

#define CMD_INITF_DEFAULT_MAC   0x1 /* init with default mac addr */

Definition at line 205 of file vnic_devcmd.h.

#define CMD_OPENF_OPROM   0x1 /* open coming from option rom */

Definition at line 202 of file vnic_devcmd.h.

#define CMD_PFILTER_ALL_MULTICAST   0x10

Definition at line 212 of file vnic_devcmd.h.

#define CMD_PFILTER_BROADCAST   0x04

Definition at line 210 of file vnic_devcmd.h.

#define CMD_PFILTER_DIRECTED   0x01

Definition at line 208 of file vnic_devcmd.h.

#define CMD_PFILTER_MULTICAST   0x02

Definition at line 209 of file vnic_devcmd.h.

#define CMD_PFILTER_PROMISCUOUS   0x08

Definition at line 211 of file vnic_devcmd.h.

#define VNIC_DEVCMD_NARGS   15

Definition at line 274 of file vnic_devcmd.h.

#define VNIC_STF_FATAL_ERR   0x0001 /* fatal fw error */

Definition at line 252 of file vnic_devcmd.h.

Enumeration Type Documentation

Enumerator:
CMD_NONE 
CMD_MCPU_FW_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CMD_INIT_PROV_INFO 
CMD_ENABLE 
CMD_DISABLE 
CMD_STATS_DUMP_ALL 
CMD_INIT_STATUS 
CMD_INT13 
CMD_LOGICAL_UPLINK 
CMD_DEINIT 

Definition at line 78 of file vnic_devcmd.h.

Enumerator:
ERR_SUCCESS 
ERR_EINVAL 
ERR_EFAULT 
ERR_EPERM 
ERR_EBUSY 
ERR_ECMDUNKNOWN 
ERR_EBADSTATE 
ERR_ENOMEM 
ERR_ETIMEDOUT 
ERR_ELINKDOWN 
ERR_EMAXRES 
ERR_ENOTSUPPORTED 
ERR_EINPROGRESS 
ERR_SUCCESS 
ERR_EINVAL 
ERR_EFAULT 
ERR_EPERM 
ERR_EBUSY 
ERR_ECMDUNKNOWN 
ERR_EBADSTATE 
ERR_ENOMEM 
ERR_ETIMEDOUT 
ERR_ELINKDOWN 

Definition at line 220 of file vnic_devcmd.h.

Enumerator:
STAT_NONE 
STAT_BUSY 
STAT_ERROR 
STAT_NONE 
STAT_BUSY 
STAT_ERROR 

Definition at line 214 of file vnic_devcmd.h.