/* Add commands before this line */
PDS_CORE_CMD_MAX,
PDS_CORE_CMD_COUNT
};
/* * enum pds_core_status_code - Device command return codes
*/ enum pds_core_status_code {
PDS_RC_SUCCESS = 0, /* Success */
PDS_RC_EVERSION = 1, /* Incorrect version for request */
PDS_RC_EOPCODE = 2, /* Invalid cmd opcode */
PDS_RC_EIO = 3, /* I/O error */
PDS_RC_EPERM = 4, /* Permission denied */
PDS_RC_EQID = 5, /* Bad qid */
PDS_RC_EQTYPE = 6, /* Bad qtype */
PDS_RC_ENOENT = 7, /* No such element */
PDS_RC_EINTR = 8, /* operation interrupted */
PDS_RC_EAGAIN = 9, /* Try again */
PDS_RC_ENOMEM = 10, /* Out of memory */
PDS_RC_EFAULT = 11, /* Bad address */
PDS_RC_EBUSY = 12, /* Device or resource busy */
PDS_RC_EEXIST = 13, /* object already exists */
PDS_RC_EINVAL = 14, /* Invalid argument */
PDS_RC_ENOSPC = 15, /* No space left or alloc failure */
PDS_RC_ERANGE = 16, /* Parameter out of range */
PDS_RC_BAD_ADDR = 17, /* Descriptor contains a bad ptr */
PDS_RC_DEV_CMD = 18, /* Device cmd attempted on AdminQ */
PDS_RC_ENOSUPP = 19, /* Operation not supported */
PDS_RC_ERROR = 29, /* Generic error */
PDS_RC_ERDMA = 30, /* Generic RDMA error */
PDS_RC_EVFID = 31, /* VF ID does not exist */
PDS_RC_BAD_FW = 32, /* FW file is invalid or corrupted */
PDS_RC_ECLIENT = 33, /* No such client id */
PDS_RC_BAD_PCI = 255, /* Broken PCI when reading status */
};
/** * struct pds_core_drv_identity - Driver identity information * @drv_type: Driver type (enum pds_core_driver_type) * @os_dist: OS distribution, numeric format * @os_dist_str: OS distribution, string format * @kernel_ver: Kernel version, numeric format * @kernel_ver_str: Kernel version, string format * @driver_ver_str: Driver version, string format
*/ struct pds_core_drv_identity {
__le32 drv_type;
__le32 os_dist; char os_dist_str[128];
__le32 kernel_ver; char kernel_ver_str[32]; char driver_ver_str[32];
};
#define PDS_DEV_TYPE_MAX 16 /** * struct pds_core_dev_identity - Device identity information * @version: Version of device identify * @type: Identify type (0 for now) * @state: Device state * @rsvd: Word boundary padding * @nlifs: Number of LIFs provisioned * @nintrs: Number of interrupts provisioned * @ndbpgs_per_lif: Number of doorbell pages per LIF * @intr_coal_mult: Interrupt coalescing multiplication factor * Scale user-supplied interrupt coalescing * value in usecs to device units using: * device units = usecs * mult / div * @intr_coal_div: Interrupt coalescing division factor * Scale user-supplied interrupt coalescing * value in usecs to device units using: * device units = usecs * mult / div * @vif_types: How many of each VIF device type is supported
*/ struct pds_core_dev_identity {
u8 version;
u8 type;
u8 state;
u8 rsvd;
__le32 nlifs;
__le32 nintrs;
__le32 ndbpgs_per_lif;
__le32 intr_coal_mult;
__le32 intr_coal_div;
__le16 vif_types[PDS_DEV_TYPE_MAX];
};
#define PDS_CORE_IDENTITY_VERSION_1 1
/** * struct pds_core_dev_identify_cmd - Driver/device identify command * @opcode: Opcode PDS_CORE_CMD_IDENTIFY * @ver: Highest version of identify supported by driver * * Expects to find driver identification info (struct pds_core_drv_identity) * in cmd_regs->data. Driver should keep the devcmd interface locked * while preparing the driver info.
*/ struct pds_core_dev_identify_cmd {
u8 opcode;
u8 ver;
};
/** * struct pds_core_dev_identify_comp - Device identify command completion * @status: Status of the command (enum pds_core_status_code) * @ver: Version of identify returned by device * * Device identification info (struct pds_core_dev_identity) can be found * in cmd_regs->data. Driver should keep the devcmd interface locked * while reading the results.
*/ struct pds_core_dev_identify_comp {
u8 status;
u8 ver;
};
/** * struct pds_core_dev_reset_cmd - Device reset command * @opcode: Opcode PDS_CORE_CMD_RESET * * Resets and clears all LIFs, VDevs, and VIFs on the device.
*/ struct pds_core_dev_reset_cmd {
u8 opcode;
};
/** * struct pds_core_dev_reset_comp - Reset command completion * @status: Status of the command (enum pds_core_status_code)
*/ struct pds_core_dev_reset_comp {
u8 status;
};
/* * struct pds_core_dev_init_data - Pointers and info needed for the Core * initialization PDS_CORE_CMD_INIT command. The in and out structs are * overlays on the pds_core_dev_cmd_regs.data space for passing data down * to the firmware on init, and then returning initialization results.
*/ struct pds_core_dev_init_data_in {
__le64 adminq_q_base;
__le64 adminq_cq_base;
__le64 notifyq_cq_base;
__le32 flags;
__le16 intr_index;
u8 adminq_ring_size;
u8 notifyq_ring_size;
};
/** * struct pds_core_dev_init_cmd - Core device initialize * @opcode: opcode PDS_CORE_CMD_INIT * * Initializes the core device and sets up the AdminQ and NotifyQ. * Expects to find initialization data (struct pds_core_dev_init_data_in) * in cmd_regs->data. Driver should keep the devcmd interface locked * while preparing the driver info.
*/ struct pds_core_dev_init_cmd {
u8 opcode;
};
/** * struct pds_core_dev_init_comp - Core init completion * @status: Status of the command (enum pds_core_status_code) * * Initialization result data (struct pds_core_dev_init_data_in) * is found in cmd_regs->data.
*/ struct pds_core_dev_init_comp {
u8 status;
};
/** * struct pds_core_fw_download_cmd - Firmware download command * @opcode: opcode * @rsvd: Word boundary padding * @addr: DMA address of the firmware buffer * @offset: offset of the firmware buffer within the full image * @length: number of valid bytes in the firmware buffer
*/ struct pds_core_fw_download_cmd {
u8 opcode;
u8 rsvd[3];
__le32 offset;
__le64 addr;
__le32 length;
};
/** * struct pds_core_fw_download_comp - Firmware download completion * @status: Status of the command (enum pds_core_status_code)
*/ struct pds_core_fw_download_comp {
u8 status;
};
/** * enum pds_core_fw_control_oper - FW control operations * @PDS_CORE_FW_INSTALL_ASYNC: Install firmware asynchronously * @PDS_CORE_FW_INSTALL_STATUS: Firmware installation status * @PDS_CORE_FW_ACTIVATE_ASYNC: Activate firmware asynchronously * @PDS_CORE_FW_ACTIVATE_STATUS: Firmware activate status * @PDS_CORE_FW_UPDATE_CLEANUP: Cleanup any firmware update leftovers * @PDS_CORE_FW_GET_BOOT: Return current active firmware slot * @PDS_CORE_FW_SET_BOOT: Set active firmware slot for next boot * @PDS_CORE_FW_GET_LIST: Return list of installed firmware images
*/ enum pds_core_fw_control_oper {
PDS_CORE_FW_INSTALL_ASYNC = 0,
PDS_CORE_FW_INSTALL_STATUS = 1,
PDS_CORE_FW_ACTIVATE_ASYNC = 2,
PDS_CORE_FW_ACTIVATE_STATUS = 3,
PDS_CORE_FW_UPDATE_CLEANUP = 4,
PDS_CORE_FW_GET_BOOT = 5,
PDS_CORE_FW_SET_BOOT = 6,
PDS_CORE_FW_GET_LIST = 7,
};
/** * enum pds_core_vf_link_status - Virtual Function link status * @PDS_CORE_VF_LINK_STATUS_AUTO: Use link state of the uplink * @PDS_CORE_VF_LINK_STATUS_UP: Link always up * @PDS_CORE_VF_LINK_STATUS_DOWN: Link always down
*/ enum pds_core_vf_link_status {
PDS_CORE_VF_LINK_STATUS_AUTO = 0,
PDS_CORE_VF_LINK_STATUS_UP = 1,
PDS_CORE_VF_LINK_STATUS_DOWN = 2,
};
/** * struct pds_core_vf_setattr_cmd - Set VF attributes on the NIC * @opcode: Opcode * @attr: Attribute type (enum pds_core_vf_attr) * @vf_index: VF index * @macaddr: mac address * @vlanid: vlan ID * @maxrate: max Tx rate in Mbps * @spoofchk: enable address spoof checking * @trust: enable VF trust * @linkstate: set link up or down * @stats: stats addr struct * @stats.pa: set DMA address for VF stats * @stats.len: length of VF stats space * @pad: force union to specific size
*/ struct pds_core_vf_setattr_cmd {
u8 opcode;
u8 attr;
__le16 vf_index; union {
u8 macaddr[6];
__le16 vlanid;
__le32 maxrate;
u8 spoofchk;
u8 trust;
u8 linkstate; struct {
__le64 pa;
__le32 len;
} stats;
u8 pad[60];
} __packed;
};
/** * struct pds_core_vf_ctrl_cmd - VF control command * @opcode: Opcode for the command * @ctrl_opcode: VF control operation type * @vf_index: VF Index. It is unused if op START_ALL is used.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.