* 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 **/
| 41 | * returns SUCCESS if it successfully copied message into the buffer |
| 42 | **/ |
| 43 | s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) |
| 44 | { |
| 45 | struct ixgbe_mbx_info *mbx = &hw->mbx; |
| 46 | s32 ret_val = IXGBE_SUCCESS; |
| 47 | |
| 48 | DEBUGFUNC("ixgbe_write_mbx"); |
| 49 | |
| 50 | if (size > mbx->size) { |
| 51 | ret_val = IXGBE_ERR_MBX; |
| 52 | ERROR_REPORT2(IXGBE_ERROR_ARGUMENT, |
| 53 | "Invalid mailbox message size %d", size); |
| 54 | } else if (mbx->ops.write) |
| 55 | ret_val = mbx->ops.write(hw, msg, size, mbx_id); |
| 56 | |
| 57 | return ret_val; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * ixgbe_check_for_msg - checks to see if someone sent us mail |
no test coverage detected