FreeBSD kernel IXGBE device code
|
Go to the source code of this file.
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_ack_pf - checks to see if the VF has ACKed @hw: pointer to the HW structure @vf_number: the VF index
returns SUCCESS if the VF has set the Status bit or else ERR_MBX
Definition at line 573 of file ixgbe_mbx.c.
References ixgbe_mbx_stats::acks, DEBUGFUNC, ixgbe_check_for_bit_pf(), IXGBE_ERR_MBX, IXGBE_MBVFICR_INDEX, IXGBE_MBVFICR_VFACK_VF1, IXGBE_SUCCESS, ixgbe_hw::mbx, and ixgbe_mbx_info::stats.
Referenced by ixgbe_init_mbx_params_pf(), and ixgbe_write_mbx_pf().
ixgbe_check_for_ack_vf - checks to see if the PF has ACK'd @hw: pointer to the HW structure @mbx_id: id of mailbox to check
returns SUCCESS if the PF has set the ACK bit or else ERR_MBX
Definition at line 358 of file ixgbe_mbx.c.
References ixgbe_mbx_stats::acks, DEBUGFUNC, ixgbe_check_for_bit_vf(), IXGBE_ERR_MBX, IXGBE_SUCCESS, IXGBE_VFMAILBOX_PFACK, ixgbe_hw::mbx, ixgbe_mbx_info::stats, and UNREFERENCED_1PARAMETER.
Referenced by ixgbe_init_mbx_params_vf(), and ixgbe_write_mbx_vf().
Definition at line 529 of file ixgbe_mbx.c.
References IXGBE_ERR_MBX, IXGBE_MBVFICR, IXGBE_READ_REG, IXGBE_SUCCESS, and IXGBE_WRITE_REG.
Referenced by ixgbe_check_for_ack_pf(), and ixgbe_check_for_msg_pf().
ixgbe_check_for_bit_vf - Determine if a status bit was set @hw: pointer to the HW structure @mask: bitmask for bits to be tested and cleared
This function is used to check for the read to clear bits within the V2P mailbox.
Definition at line 316 of file ixgbe_mbx.c.
References IXGBE_ERR_MBX, ixgbe_read_v2p_mailbox(), IXGBE_SUCCESS, ixgbe_hw::mbx, and ixgbe_mbx_info::v2p_mailbox.
Referenced by ixgbe_check_for_ack_vf(), ixgbe_check_for_msg_vf(), and ixgbe_check_for_rst_vf().
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_msg_pf - checks to see if the VF has sent mail @hw: pointer to the HW structure @vf_number: the VF index
returns SUCCESS if the VF has set the Status bit or else ERR_MBX
Definition at line 549 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_check_for_bit_pf(), IXGBE_ERR_MBX, IXGBE_MBVFICR_INDEX, IXGBE_MBVFICR_VFREQ_VF1, IXGBE_SUCCESS, ixgbe_hw::mbx, ixgbe_mbx_stats::reqs, and ixgbe_mbx_info::stats.
Referenced by ixgbe_init_mbx_params_pf(), and ixgbe_write_mbx_pf().
ixgbe_check_for_msg_vf - checks to see if the PF has sent mail @hw: pointer to the HW structure @mbx_id: id of mailbox to check
returns SUCCESS if the PF has set the Status bit or else ERR_MBX
Definition at line 336 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_check_for_bit_vf(), IXGBE_ERR_MBX, IXGBE_SUCCESS, IXGBE_VFMAILBOX_PFSTS, ixgbe_hw::mbx, ixgbe_mbx_stats::reqs, ixgbe_mbx_info::stats, and UNREFERENCED_1PARAMETER.
Referenced by ixgbe_init_mbx_params_vf(), and ixgbe_write_mbx_vf().
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.
ixgbe_check_for_rst_pf - checks to see if the VF has reset @hw: pointer to the HW structure @vf_number: the VF index
returns SUCCESS if the VF has set the Status bit or else ERR_MBX
Definition at line 597 of file ixgbe_mbx.c.
References DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_mac_82599EB, ixgbe_mac_X540, ixgbe_mac_X550, ixgbe_mac_X550EM_a, ixgbe_mac_X550EM_x, IXGBE_READ_REG, IXGBE_SUCCESS, IXGBE_VFLRE, IXGBE_VFLREC, IXGBE_WRITE_REG, ixgbe_hw::mac, ixgbe_hw::mbx, ixgbe_mbx_stats::rsts, ixgbe_mbx_info::stats, and ixgbe_mac_info::type.
Referenced by ixgbe_init_mbx_params_pf().
ixgbe_check_for_rst_vf - checks to see if the PF has reset @hw: pointer to the HW structure @mbx_id: id of mailbox to check
returns true if the PF has set the reset done bit or else false
Definition at line 380 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_check_for_bit_vf(), IXGBE_ERR_MBX, IXGBE_SUCCESS, IXGBE_VFMAILBOX_RSTD, IXGBE_VFMAILBOX_RSTI, ixgbe_hw::mbx, ixgbe_mbx_stats::rsts, ixgbe_mbx_info::stats, and UNREFERENCED_1PARAMETER.
Referenced by ixgbe_init_mbx_params_vf().
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_obtain_mbx_lock_pf - obtain mailbox lock @hw: pointer to the HW structure @vf_number: the VF index
return SUCCESS if we obtained the mailbox lock
Definition at line 636 of file ixgbe_mbx.c.
References DEBUGFUNC, ERROR_REPORT2, IXGBE_ERR_MBX, IXGBE_ERROR_POLLING, IXGBE_PFMAILBOX, IXGBE_PFMAILBOX_PFU, IXGBE_READ_REG, IXGBE_SUCCESS, and IXGBE_WRITE_REG.
Referenced by ixgbe_read_mbx_pf(), and ixgbe_write_mbx_pf().
ixgbe_obtain_mbx_lock_vf - obtain mailbox lock @hw: pointer to the HW structure
return SUCCESS if we obtained the mailbox lock
Definition at line 402 of file ixgbe_mbx.c.
References DEBUGFUNC, IXGBE_ERR_MBX, ixgbe_read_v2p_mailbox(), IXGBE_SUCCESS, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_VFU, and IXGBE_WRITE_REG.
Referenced by ixgbe_read_mbx_vf(), and ixgbe_write_mbx_vf().
ixgbe_poll_for_ack - Wait for message acknowledgment @hw: pointer to the HW structure @mbx_id: id of mailbox to write
returns SUCCESS if it successfully received a message acknowledgment
Definition at line 190 of file ixgbe_mbx.c.
References ixgbe_mbx_operations::check_for_ack, DEBUGFUNC, ERROR_REPORT2, IXGBE_ERR_MBX, IXGBE_ERROR_POLLING, IXGBE_SUCCESS, ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_info::timeout, usec_delay, and ixgbe_mbx_info::usec_delay.
Referenced by ixgbe_write_posted_mbx().
ixgbe_poll_for_msg - Wait for message notification @hw: pointer to the HW structure @mbx_id: id of mailbox to write
returns SUCCESS if it successfully received a message notification
Definition at line 158 of file ixgbe_mbx.c.
References ixgbe_mbx_operations::check_for_msg, DEBUGFUNC, ERROR_REPORT2, IXGBE_ERR_MBX, IXGBE_ERROR_POLLING, IXGBE_SUCCESS, ixgbe_hw::mbx, ixgbe_mbx_info::ops, ixgbe_mbx_info::timeout, usec_delay, and ixgbe_mbx_info::usec_delay.
Referenced by ixgbe_read_posted_mbx().
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_mbx_pf - Read a message from the mailbox @hw: pointer to the HW structure @msg: The message buffer @size: Length of buffer @vf_number: the VF index
This function copies a message from the mailbox buffer to the caller's memory buffer. The presumption is that the caller knows that there was a message due to a VF request so no polling for message is needed.
Definition at line 710 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_obtain_mbx_lock_pf(), IXGBE_PFMAILBOX, IXGBE_PFMAILBOX_ACK, IXGBE_PFMBMEM, IXGBE_READ_REG_ARRAY, IXGBE_WRITE_REG, ixgbe_hw::mbx, ixgbe_mbx_stats::msgs_rx, ixgbe_mbx_info::size, and ixgbe_mbx_info::stats.
Referenced by ixgbe_init_mbx_params_pf().
ixgbe_read_mbx_vf - Reads a message from the inbox intended for vf @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 469 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_obtain_mbx_lock_vf(), IXGBE_READ_REG_ARRAY, IXGBE_SUCCESS, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_ACK, IXGBE_VFMBMEM, IXGBE_WRITE_REG, ixgbe_hw::mbx, ixgbe_mbx_stats::msgs_rx, ixgbe_mbx_info::size, ixgbe_mbx_info::stats, and UNREFERENCED_1PARAMETER.
Referenced by ixgbe_init_mbx_params_vf().
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_read_v2p_mailbox - read v2p mailbox @hw: pointer to the HW structure
This function is used to read the v2p mailbox without losing the read to clear status bits.
Definition at line 298 of file ixgbe_mbx.c.
References IXGBE_READ_REG, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_R2C_BITS, ixgbe_hw::mbx, and ixgbe_mbx_info::v2p_mailbox.
Referenced by ixgbe_check_for_bit_vf(), and ixgbe_obtain_mbx_lock_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_mbx_pf - Places a message in the mailbox @hw: pointer to the HW structure @msg: The message buffer @size: Length of buffer @vf_number: the VF index
returns SUCCESS if it successfully copied message into the buffer
Definition at line 667 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_check_for_ack_pf(), ixgbe_check_for_msg_pf(), ixgbe_obtain_mbx_lock_pf(), IXGBE_PFMAILBOX, IXGBE_PFMAILBOX_STS, IXGBE_PFMBMEM, IXGBE_WRITE_REG, IXGBE_WRITE_REG_ARRAY, ixgbe_hw::mbx, ixgbe_mbx_stats::msgs_tx, ixgbe_mbx_info::size, and ixgbe_mbx_info::stats.
Referenced by ixgbe_init_mbx_params_pf().
ixgbe_write_mbx_vf - 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 427 of file ixgbe_mbx.c.
References DEBUGFUNC, ixgbe_check_for_ack_vf(), ixgbe_check_for_msg_vf(), ixgbe_obtain_mbx_lock_vf(), IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_REQ, IXGBE_VFMBMEM, IXGBE_WRITE_REG, IXGBE_WRITE_REG_ARRAY, ixgbe_hw::mbx, ixgbe_mbx_stats::msgs_tx, ixgbe_mbx_info::size, ixgbe_mbx_info::stats, and UNREFERENCED_1PARAMETER.
Referenced by ixgbe_init_mbx_params_vf().
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().