FreeBSD kernel IXGBE device code
|
#include "ixgbe_type.h"
Go to the source code of this file.
Macros | |
#define | IXGBE_VFMAILBOX_SIZE 16 /* 16 32 bit words - 64 bytes */ |
#define | IXGBE_ERR_MBX -100 |
#define | IXGBE_VFMAILBOX 0x002FC |
#define | IXGBE_VFMBMEM 0x00200 |
#define | IXGBE_VFMAILBOX_REQ 0x00000001 /* Request for PF Ready bit */ |
#define | IXGBE_VFMAILBOX_ACK 0x00000002 /* Ack PF message received */ |
#define | IXGBE_VFMAILBOX_VFU 0x00000004 /* VF owns the mailbox buffer */ |
#define | IXGBE_VFMAILBOX_PFU 0x00000008 /* PF owns the mailbox buffer */ |
#define | IXGBE_VFMAILBOX_PFSTS 0x00000010 /* PF wrote a message in the MB */ |
#define | IXGBE_VFMAILBOX_PFACK 0x00000020 /* PF ack the previous VF msg */ |
#define | IXGBE_VFMAILBOX_RSTI 0x00000040 /* PF has reset indication */ |
#define | IXGBE_VFMAILBOX_RSTD 0x00000080 /* PF has indicated reset done */ |
#define | IXGBE_VFMAILBOX_R2C_BITS 0x000000B0 /* All read to clear bits */ |
#define | IXGBE_PFMAILBOX_STS 0x00000001 /* Initiate message send to VF */ |
#define | IXGBE_PFMAILBOX_ACK 0x00000002 /* Ack message recv'd from VF */ |
#define | IXGBE_PFMAILBOX_VFU 0x00000004 /* VF owns the mailbox buffer */ |
#define | IXGBE_PFMAILBOX_PFU 0x00000008 /* PF owns the mailbox buffer */ |
#define | IXGBE_PFMAILBOX_RVFU 0x00000010 /* Reset VFU - used when VF stuck */ |
#define | IXGBE_MBVFICR_VFREQ_MASK 0x0000FFFF /* bits for VF messages */ |
#define | IXGBE_MBVFICR_VFREQ_VF1 0x00000001 /* bit for VF 1 message */ |
#define | IXGBE_MBVFICR_VFACK_MASK 0xFFFF0000 /* bits for VF acks */ |
#define | IXGBE_MBVFICR_VFACK_VF1 0x00010000 /* bit for VF 1 ack */ |
#define | IXGBE_VT_MSGTYPE_ACK |
#define | IXGBE_VT_MSGTYPE_NACK |
#define | IXGBE_VT_MSGTYPE_CTS |
#define | IXGBE_VT_MSGINFO_SHIFT 16 |
#define | IXGBE_VT_MSGINFO_MASK (0xFF << IXGBE_VT_MSGINFO_SHIFT) |
#define | IXGBE_VF_RESET 0x01 /* VF requests reset */ |
#define | IXGBE_VF_SET_MAC_ADDR 0x02 /* VF requests PF to set MAC addr */ |
#define | IXGBE_VF_SET_MULTICAST 0x03 /* VF requests PF to set MC addr */ |
#define | IXGBE_VF_SET_VLAN 0x04 /* VF requests PF to set VLAN */ |
#define | IXGBE_VF_SET_LPE 0x05 /* VF requests PF to set VMOLR.LPE */ |
#define | IXGBE_VF_SET_MACVLAN 0x06 /* VF requests PF for unicast filter */ |
#define | IXGBE_VF_API_NEGOTIATE 0x08 /* negotiate API version */ |
#define | IXGBE_VF_GET_QUEUES 0x09 /* get queue configuration */ |
#define | IXGBE_VF_GET_RETA 0x0a /* VF request for RETA */ |
#define | IXGBE_VF_GET_RSS_KEY 0x0b /* get RSS key */ |
#define | IXGBE_VF_UPDATE_XCAST_MODE 0x0c |
#define | IXGBE_VF_GET_LINK_STATE 0x10 |
#define | IXGBE_VF_TX_QUEUES 1 /* number of Tx queues supported */ |
#define | IXGBE_VF_RX_QUEUES 2 /* number of Rx queues supported */ |
#define | IXGBE_VF_TRANS_VLAN 3 /* Indication of port vlan */ |
#define | IXGBE_VF_DEF_QUEUE 4 /* Default queue offset */ |
#define | IXGBE_VF_PERMADDR_MSG_LEN 4 |
#define | IXGBE_VF_MC_TYPE_WORD 3 |
#define | IXGBE_PF_CONTROL_MSG 0x0100 /* PF control message */ |
#define | IXGBE_VF_API_NEGOTIATE 0x08 /* negotiate API version */ |
#define | IXGBE_VF_GET_QUEUES 0x09 /* get queue configuration */ |
#define | IXGBE_VF_ENABLE_MACADDR 0x0A /* enable MAC address */ |
#define | IXGBE_VF_DISABLE_MACADDR 0x0B /* disable MAC address */ |
#define | IXGBE_VF_GET_MACADDRS 0x0C /* get all configured MAC addrs */ |
#define | IXGBE_VF_SET_MCAST_PROMISC 0x0D /* enable multicast promiscuous */ |
#define | IXGBE_VF_GET_MTU 0x0E /* get bounds on MTU */ |
#define | IXGBE_VF_SET_MTU 0x0F /* set a specific MTU */ |
#define | IXGBE_PF_TRANSPARENT_VLAN 0x0101 /* enable transparent vlan */ |
#define | IXGBE_VF_MBX_INIT_TIMEOUT 2000 /* number of retries on mailbox */ |
#define | IXGBE_VF_MBX_INIT_DELAY 500 /* microseconds between retries */ |
Enumerations | |
enum | ixgbe_pfvf_api_rev { ixgbe_mbox_api_10 , ixgbe_mbox_api_20 , ixgbe_mbox_api_11 , ixgbe_mbox_api_12 , ixgbe_mbox_api_13 , ixgbe_mbox_api_unknown } |
enum | ixgbevf_xcast_modes { IXGBEVF_XCAST_MODE_NONE = 0 , IXGBEVF_XCAST_MODE_MULTI , IXGBEVF_XCAST_MODE_ALLMULTI , IXGBEVF_XCAST_MODE_PROMISC } |
Functions | |
s32 | ixgbe_read_mbx (struct ixgbe_hw *, u32 *, u16, u16) |
s32 | ixgbe_write_mbx (struct ixgbe_hw *, u32 *, u16, u16) |
s32 | ixgbe_read_posted_mbx (struct ixgbe_hw *, u32 *, u16, u16) |
s32 | ixgbe_write_posted_mbx (struct ixgbe_hw *, u32 *, u16, u16) |
s32 | ixgbe_check_for_msg (struct ixgbe_hw *, u16) |
s32 | ixgbe_check_for_ack (struct ixgbe_hw *, u16) |
s32 | ixgbe_check_for_rst (struct ixgbe_hw *, u16) |
void | ixgbe_init_mbx_ops_generic (struct ixgbe_hw *hw) |
void | ixgbe_init_mbx_params_vf (struct ixgbe_hw *) |
void | ixgbe_init_mbx_params_pf (struct ixgbe_hw *) |
#define IXGBE_ERR_MBX -100 |
Definition at line 42 of file ixgbe_mbx.h.
#define IXGBE_MBVFICR_VFACK_MASK 0xFFFF0000 /* bits for VF acks */ |
Definition at line 66 of file ixgbe_mbx.h.
#define IXGBE_MBVFICR_VFACK_VF1 0x00010000 /* bit for VF 1 ack */ |
Definition at line 67 of file ixgbe_mbx.h.
#define IXGBE_MBVFICR_VFREQ_MASK 0x0000FFFF /* bits for VF messages */ |
Definition at line 64 of file ixgbe_mbx.h.
#define IXGBE_MBVFICR_VFREQ_VF1 0x00000001 /* bit for VF 1 message */ |
Definition at line 65 of file ixgbe_mbx.h.
#define IXGBE_PF_CONTROL_MSG 0x0100 /* PF control message */ |
Definition at line 136 of file ixgbe_mbx.h.
#define IXGBE_PF_TRANSPARENT_VLAN 0x0101 /* enable transparent vlan */ |
Definition at line 149 of file ixgbe_mbx.h.
#define IXGBE_PFMAILBOX_ACK 0x00000002 /* Ack message recv'd from VF */ |
Definition at line 59 of file ixgbe_mbx.h.
#define IXGBE_PFMAILBOX_PFU 0x00000008 /* PF owns the mailbox buffer */ |
Definition at line 61 of file ixgbe_mbx.h.
#define IXGBE_PFMAILBOX_RVFU 0x00000010 /* Reset VFU - used when VF stuck */ |
Definition at line 62 of file ixgbe_mbx.h.
#define IXGBE_PFMAILBOX_STS 0x00000001 /* Initiate message send to VF */ |
Definition at line 58 of file ixgbe_mbx.h.
#define IXGBE_PFMAILBOX_VFU 0x00000004 /* VF owns the mailbox buffer */ |
Definition at line 60 of file ixgbe_mbx.h.
#define IXGBE_VF_API_NEGOTIATE 0x08 /* negotiate API version */ |
Definition at line 139 of file ixgbe_mbx.h.
#define IXGBE_VF_API_NEGOTIATE 0x08 /* negotiate API version */ |
Definition at line 139 of file ixgbe_mbx.h.
#define IXGBE_VF_DEF_QUEUE 4 /* Default queue offset */ |
Definition at line 129 of file ixgbe_mbx.h.
#define IXGBE_VF_DISABLE_MACADDR 0x0B /* disable MAC address */ |
Definition at line 142 of file ixgbe_mbx.h.
#define IXGBE_VF_ENABLE_MACADDR 0x0A /* enable MAC address */ |
Definition at line 141 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_LINK_STATE 0x10 |
Definition at line 115 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_MACADDRS 0x0C /* get all configured MAC addrs */ |
Definition at line 143 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_MTU 0x0E /* get bounds on MTU */ |
Definition at line 145 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_QUEUES 0x09 /* get queue configuration */ |
Definition at line 140 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_QUEUES 0x09 /* get queue configuration */ |
Definition at line 140 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_RETA 0x0a /* VF request for RETA */ |
Definition at line 112 of file ixgbe_mbx.h.
#define IXGBE_VF_GET_RSS_KEY 0x0b /* get RSS key */ |
Definition at line 113 of file ixgbe_mbx.h.
#define IXGBE_VF_MBX_INIT_DELAY 500 /* microseconds between retries */ |
Definition at line 152 of file ixgbe_mbx.h.
#define IXGBE_VF_MBX_INIT_TIMEOUT 2000 /* number of retries on mailbox */ |
Definition at line 151 of file ixgbe_mbx.h.
#define IXGBE_VF_MC_TYPE_WORD 3 |
Definition at line 134 of file ixgbe_mbx.h.
#define IXGBE_VF_PERMADDR_MSG_LEN 4 |
Definition at line 132 of file ixgbe_mbx.h.
#define IXGBE_VF_RESET 0x01 /* VF requests reset */ |
Definition at line 98 of file ixgbe_mbx.h.
#define IXGBE_VF_RX_QUEUES 2 /* number of Rx queues supported */ |
Definition at line 127 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_LPE 0x05 /* VF requests PF to set VMOLR.LPE */ |
Definition at line 104 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_MAC_ADDR 0x02 /* VF requests PF to set MAC addr */ |
Definition at line 99 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_MACVLAN 0x06 /* VF requests PF for unicast filter */ |
Definition at line 105 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_MCAST_PROMISC 0x0D /* enable multicast promiscuous */ |
Definition at line 144 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_MTU 0x0F /* set a specific MTU */ |
Definition at line 146 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_MULTICAST 0x03 /* VF requests PF to set MC addr */ |
Definition at line 100 of file ixgbe_mbx.h.
#define IXGBE_VF_SET_VLAN 0x04 /* VF requests PF to set VLAN */ |
Definition at line 101 of file ixgbe_mbx.h.
#define IXGBE_VF_TRANS_VLAN 3 /* Indication of port vlan */ |
Definition at line 128 of file ixgbe_mbx.h.
#define IXGBE_VF_TX_QUEUES 1 /* number of Tx queues supported */ |
Definition at line 126 of file ixgbe_mbx.h.
#define IXGBE_VF_UPDATE_XCAST_MODE 0x0c |
Definition at line 114 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX 0x002FC |
Definition at line 44 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_ACK 0x00000002 /* Ack PF message received */ |
Definition at line 49 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_PFACK 0x00000020 /* PF ack the previous VF msg */ |
Definition at line 53 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_PFSTS 0x00000010 /* PF wrote a message in the MB */ |
Definition at line 52 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_PFU 0x00000008 /* PF owns the mailbox buffer */ |
Definition at line 51 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_R2C_BITS 0x000000B0 /* All read to clear bits */ |
Definition at line 56 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_REQ 0x00000001 /* Request for PF Ready bit */ |
Definition at line 48 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_RSTD 0x00000080 /* PF has indicated reset done */ |
Definition at line 55 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_RSTI 0x00000040 /* PF has reset indication */ |
Definition at line 54 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_SIZE 16 /* 16 32 bit words - 64 bytes */ |
Definition at line 41 of file ixgbe_mbx.h.
#define IXGBE_VFMAILBOX_VFU 0x00000004 /* VF owns the mailbox buffer */ |
Definition at line 50 of file ixgbe_mbx.h.
#define IXGBE_VFMBMEM 0x00200 |
Definition at line 45 of file ixgbe_mbx.h.
#define IXGBE_VT_MSGINFO_MASK (0xFF << IXGBE_VT_MSGINFO_SHIFT) |
Definition at line 79 of file ixgbe_mbx.h.
#define IXGBE_VT_MSGINFO_SHIFT 16 |
Definition at line 77 of file ixgbe_mbx.h.
#define IXGBE_VT_MSGTYPE_ACK |
Definition at line 74 of file ixgbe_mbx.h.
#define IXGBE_VT_MSGTYPE_CTS |
Definition at line 76 of file ixgbe_mbx.h.
#define IXGBE_VT_MSGTYPE_NACK |
Definition at line 75 of file ixgbe_mbx.h.
enum ixgbe_pfvf_api_rev |
Enumerator | |
---|---|
ixgbe_mbox_api_10 | |
ixgbe_mbox_api_20 | |
ixgbe_mbox_api_11 | |
ixgbe_mbox_api_12 | |
ixgbe_mbox_api_13 | |
ixgbe_mbox_api_unknown |
Definition at line 87 of file ixgbe_mbx.h.
enum ixgbevf_xcast_modes |
Enumerator | |
---|---|
IXGBEVF_XCAST_MODE_NONE | |
IXGBEVF_XCAST_MODE_MULTI | |
IXGBEVF_XCAST_MODE_ALLMULTI | |
IXGBEVF_XCAST_MODE_PROMISC |
Definition at line 118 of file ixgbe_mbx.h.
ixgbe_check_for_ack - checks to see if someone sent us ACK @hw: pointer to the HW structure @mbx_id: id of mailbox to check
returns SUCCESS if the Status bit was found or else ERR_MBX
Definition at line 118 of file ixgbe_mbx.c.
References ixgbe_mbx_operations::check_for_ack, DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_hw::mbx, and ixgbe_mbx_info::ops.
ixgbe_check_for_msg - checks to see if someone sent us mail @hw: pointer to the HW structure @mbx_id: id of mailbox to check
returns SUCCESS if the Status bit was found or else ERR_MBX
Definition at line 98 of file ixgbe_mbx.c.
References ixgbe_mbx_operations::check_for_msg, DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_hw::mbx, and ixgbe_mbx_info::ops.
ixgbe_check_for_rst - checks to see if other side has reset @hw: pointer to the HW structure @mbx_id: id of mailbox to check
returns SUCCESS if the Status bit was found or else ERR_MBX
Definition at line 138 of file ixgbe_mbx.c.
References ixgbe_mbx_operations::check_for_rst, DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_hw::mbx, and ixgbe_mbx_info::ops.
void ixgbe_init_mbx_ops_generic | ( | struct ixgbe_hw * | hw | ) |
ixgbe_init_mbx_ops_generic - Initialize MB function pointers @hw: pointer to the HW structure
Setups up the mailbox read and write message function pointers
Definition at line 283 of file ixgbe_mbx.c.
References ixgbe_read_posted_mbx(), ixgbe_write_posted_mbx(), ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_operations::read_posted, and ixgbe_mbx_operations::write_posted.
void ixgbe_init_mbx_params_pf | ( | struct ixgbe_hw * | hw | ) |
ixgbe_init_mbx_params_pf - set initial values for pf mailbox @hw: pointer to the HW structure
Initializes the hw->mbx struct to correct values for pf mailbox
Definition at line 743 of file ixgbe_mbx.c.
References ixgbe_mbx_stats::acks, ixgbe_mbx_operations::check_for_ack, ixgbe_mbx_operations::check_for_msg, ixgbe_mbx_operations::check_for_rst, ixgbe_check_for_ack_pf(), ixgbe_check_for_msg_pf(), ixgbe_check_for_rst_pf(), ixgbe_mac_82599EB, ixgbe_mac_X540, ixgbe_mac_X550, ixgbe_mac_X550EM_a, ixgbe_mac_X550EM_x, ixgbe_read_mbx_pf(), ixgbe_read_posted_mbx(), IXGBE_VFMAILBOX_SIZE, ixgbe_write_mbx_pf(), ixgbe_write_posted_mbx(), ixgbe_hw::mac, ixgbe_hw::mbx, ixgbe_mbx_stats::msgs_rx, ixgbe_mbx_stats::msgs_tx, ixgbe_mbx_info::ops, ixgbe_mbx_operations::read, ixgbe_mbx_operations::read_posted, ixgbe_mbx_stats::reqs, ixgbe_mbx_stats::rsts, ixgbe_mbx_info::size, ixgbe_mbx_info::stats, ixgbe_mbx_info::timeout, ixgbe_mac_info::type, ixgbe_mbx_info::usec_delay, ixgbe_mbx_operations::write, and ixgbe_mbx_operations::write_posted.
Referenced by ixgbe_init_ops_82599(), and ixgbe_init_ops_X540().
void ixgbe_init_mbx_params_vf | ( | struct ixgbe_hw * | hw | ) |
ixgbe_init_mbx_params_vf - set initial values for vf mailbox @hw: pointer to the HW structure
Initializes the hw->mbx struct to correct values for vf mailbox
Definition at line 503 of file ixgbe_mbx.c.
References ixgbe_mbx_stats::acks, ixgbe_mbx_operations::check_for_ack, ixgbe_mbx_operations::check_for_msg, ixgbe_mbx_operations::check_for_rst, ixgbe_check_for_ack_vf(), ixgbe_check_for_msg_vf(), ixgbe_check_for_rst_vf(), ixgbe_read_mbx_vf(), ixgbe_read_posted_mbx(), IXGBE_VF_MBX_INIT_DELAY, IXGBE_VFMAILBOX_SIZE, ixgbe_write_mbx_vf(), ixgbe_write_posted_mbx(), ixgbe_hw::mbx, ixgbe_mbx_stats::msgs_rx, ixgbe_mbx_stats::msgs_tx, ixgbe_mbx_info::ops, ixgbe_mbx_operations::read, ixgbe_mbx_operations::read_posted, ixgbe_mbx_stats::reqs, ixgbe_mbx_stats::rsts, ixgbe_mbx_info::size, ixgbe_mbx_info::stats, ixgbe_mbx_info::timeout, ixgbe_mbx_info::usec_delay, ixgbe_mbx_operations::write, and ixgbe_mbx_operations::write_posted.
Referenced by ixgbe_init_ops_vf(), and ixv_if_attach_pre().
ixgbe_read_mbx - Reads a message from the mailbox @hw: pointer to the HW structure @msg: The message buffer @size: Length of buffer @mbx_id: id of mailbox to read
returns SUCCESS if it successfully read message from buffer
Definition at line 48 of file ixgbe_mbx.c.
References DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_operations::read, and ixgbe_mbx_info::size.
ixgbe_read_posted_mbx - Wait for message notification and receive message @hw: pointer to the HW structure @msg: The message buffer @size: Length of buffer @mbx_id: id of mailbox to write
returns SUCCESS if it successfully received a message notification and copied it into the receive buffer.
Definition at line 225 of file ixgbe_mbx.c.
References DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_poll_for_msg(), ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_operations::read, and ixgbe_mbx_info::size.
Referenced by ixgbe_init_mbx_ops_generic(), ixgbe_init_mbx_params_pf(), and ixgbe_init_mbx_params_vf().
ixgbe_write_mbx - Write a message to the mailbox @hw: pointer to the HW structure @msg: The message buffer @size: Length of buffer @mbx_id: id of mailbox to write
returns SUCCESS if it successfully copied message into the buffer
Definition at line 74 of file ixgbe_mbx.c.
References DEBUGFUNC, ERROR_REPORT2, IXGBE_ERR_MBX, IXGBE_ERROR_ARGUMENT, IXGBE_SUCCESS, ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_info::size, and ixgbe_mbx_operations::write.
ixgbe_write_posted_mbx - Write a message to the mailbox, wait for ack @hw: pointer to the HW structure @msg: The message buffer @size: Length of buffer @mbx_id: id of mailbox to write
returns SUCCESS if it successfully copied message into the buffer and received an ack to that message within delay * timeout period
Definition at line 255 of file ixgbe_mbx.c.
References DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_poll_for_ack(), ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_info::size, ixgbe_mbx_info::timeout, and ixgbe_mbx_operations::write.
Referenced by ixgbe_init_mbx_ops_generic(), ixgbe_init_mbx_params_pf(), and ixgbe_init_mbx_params_vf().