* ngbe_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 0 if it successfully copied message into the buffer **/
| 41 | * returns 0 if it successfully copied message into the buffer |
| 42 | **/ |
| 43 | s32 ngbe_write_mbx(struct ngbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) |
| 44 | { |
| 45 | struct ngbe_mbx_info *mbx = &hw->mbx; |
| 46 | s32 ret_val = 0; |
| 47 | |
| 48 | if (size > mbx->size) { |
| 49 | ret_val = NGBE_ERR_MBX; |
| 50 | DEBUGOUT("Invalid mailbox message size %d", size); |
| 51 | } else if (mbx->write) { |
| 52 | ret_val = mbx->write(hw, msg, size, mbx_id); |
| 53 | } |
| 54 | |
| 55 | return ret_val; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * ngbe_check_for_msg - checks to see if someone sent us mail |
no test coverage detected