Lines Matching refs:hw

35 static s32 e1000_poll_for_msg(struct e1000_hw *hw)  in e1000_poll_for_msg()  argument
37 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_poll_for_msg()
43 while (countdown && mbx->ops.check_for_msg(hw)) { in e1000_poll_for_msg()
61 static s32 e1000_poll_for_ack(struct e1000_hw *hw) in e1000_poll_for_ack() argument
63 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_poll_for_ack()
69 while (countdown && mbx->ops.check_for_ack(hw)) { in e1000_poll_for_ack()
90 static s32 e1000_read_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size) in e1000_read_posted_mbx() argument
92 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_read_posted_mbx()
98 ret_val = e1000_poll_for_msg(hw); in e1000_read_posted_mbx()
102 ret_val = mbx->ops.read(hw, msg, size); in e1000_read_posted_mbx()
116 static s32 e1000_write_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size) in e1000_write_posted_mbx() argument
118 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_write_posted_mbx()
126 ret_val = mbx->ops.write(hw, msg, size); in e1000_write_posted_mbx()
130 ret_val = e1000_poll_for_ack(hw); in e1000_write_posted_mbx()
142 static u32 e1000_read_v2p_mailbox(struct e1000_hw *hw) in e1000_read_v2p_mailbox() argument
146 v2p_mailbox |= hw->dev_spec.vf.v2p_mailbox; in e1000_read_v2p_mailbox()
147 hw->dev_spec.vf.v2p_mailbox |= v2p_mailbox & E1000_V2PMAILBOX_R2C_BITS; in e1000_read_v2p_mailbox()
160 static s32 e1000_check_for_bit_vf(struct e1000_hw *hw, u32 mask) in e1000_check_for_bit_vf() argument
162 u32 v2p_mailbox = e1000_read_v2p_mailbox(hw); in e1000_check_for_bit_vf()
168 hw->dev_spec.vf.v2p_mailbox &= ~mask; in e1000_check_for_bit_vf()
179 static s32 e1000_check_for_msg_vf(struct e1000_hw *hw) in e1000_check_for_msg_vf() argument
183 if (!e1000_check_for_bit_vf(hw, E1000_V2PMAILBOX_PFSTS)) { in e1000_check_for_msg_vf()
185 hw->mbx.stats.reqs++; in e1000_check_for_msg_vf()
197 static s32 e1000_check_for_ack_vf(struct e1000_hw *hw) in e1000_check_for_ack_vf() argument
201 if (!e1000_check_for_bit_vf(hw, E1000_V2PMAILBOX_PFACK)) { in e1000_check_for_ack_vf()
203 hw->mbx.stats.acks++; in e1000_check_for_ack_vf()
215 static s32 e1000_check_for_rst_vf(struct e1000_hw *hw) in e1000_check_for_rst_vf() argument
219 if (!e1000_check_for_bit_vf(hw, (E1000_V2PMAILBOX_RSTD | in e1000_check_for_rst_vf()
222 hw->mbx.stats.rsts++; in e1000_check_for_rst_vf()
234 static s32 e1000_obtain_mbx_lock_vf(struct e1000_hw *hw) in e1000_obtain_mbx_lock_vf() argument
242 if (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU) in e1000_obtain_mbx_lock_vf()
256 static s32 e1000_write_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size) in e1000_write_mbx_vf() argument
262 err = e1000_obtain_mbx_lock_vf(hw); in e1000_write_mbx_vf()
267 e1000_check_for_ack_vf(hw); in e1000_write_mbx_vf()
268 e1000_check_for_msg_vf(hw); in e1000_write_mbx_vf()
275 hw->mbx.stats.msgs_tx++; in e1000_write_mbx_vf()
292 static s32 e1000_read_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size) in e1000_read_mbx_vf() argument
298 err = e1000_obtain_mbx_lock_vf(hw); in e1000_read_mbx_vf()
310 hw->mbx.stats.msgs_rx++; in e1000_read_mbx_vf()
322 s32 e1000_init_mbx_params_vf(struct e1000_hw *hw) in e1000_init_mbx_params_vf() argument
324 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_init_mbx_params_vf()