Lines Matching refs:hw

32  *  @hw: pointer to the HW structure
39 s32 igb_read_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id)
41 struct e1000_mbx_info *mbx = &hw->mbx;
49 ret_val = mbx->ops.read(hw, msg, size, mbx_id);
56 * @hw: pointer to the HW structure
63 s32 igb_write_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id)
65 struct e1000_mbx_info *mbx = &hw->mbx;
72 ret_val = mbx->ops.write(hw, msg, size, mbx_id);
79 * @hw: pointer to the HW structure
84 s32 igb_check_for_msg(struct e1000_hw *hw, u16 mbx_id)
86 struct e1000_mbx_info *mbx = &hw->mbx;
90 ret_val = mbx->ops.check_for_msg(hw, mbx_id);
97 * @hw: pointer to the HW structure
102 s32 igb_check_for_ack(struct e1000_hw *hw, u16 mbx_id)
104 struct e1000_mbx_info *mbx = &hw->mbx;
108 ret_val = mbx->ops.check_for_ack(hw, mbx_id);
115 * @hw: pointer to the HW structure
120 s32 igb_check_for_rst(struct e1000_hw *hw, u16 mbx_id)
122 struct e1000_mbx_info *mbx = &hw->mbx;
126 ret_val = mbx->ops.check_for_rst(hw, mbx_id);
133 * @hw: pointer to the HW structure
138 static s32 igb_poll_for_msg(struct e1000_hw *hw, u16 mbx_id)
140 struct e1000_mbx_info *mbx = &hw->mbx;
146 while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) {
162 * @hw: pointer to the HW structure
167 static s32 igb_poll_for_ack(struct e1000_hw *hw, u16 mbx_id)
169 struct e1000_mbx_info *mbx = &hw->mbx;
175 while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) {
191 * @hw: pointer to the HW structure
199 static s32 igb_read_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id)
201 struct e1000_mbx_info *mbx = &hw->mbx;
207 ret_val = igb_poll_for_msg(hw, mbx_id);
210 ret_val = mbx->ops.read(hw, msg, size, mbx_id);
217 * @hw: pointer to the HW structure
225 static s32 igb_write_posted_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id)
227 struct e1000_mbx_info *mbx = &hw->mbx;
235 ret_val = mbx->ops.write(hw, msg, size, mbx_id);
239 ret_val = igb_poll_for_ack(hw, mbx_id);
244 static s32 igb_check_for_bit_pf(struct e1000_hw *hw, u32 mask)
259 * @hw: pointer to the HW structure
264 static s32 igb_check_for_msg_pf(struct e1000_hw *hw, u16 vf_number)
268 if (!igb_check_for_bit_pf(hw, E1000_MBVFICR_VFREQ_VF1 << vf_number)) {
270 hw->mbx.stats.reqs++;
278 * @hw: pointer to the HW structure
283 static s32 igb_check_for_ack_pf(struct e1000_hw *hw, u16 vf_number)
287 if (!igb_check_for_bit_pf(hw, E1000_MBVFICR_VFACK_VF1 << vf_number)) {
289 hw->mbx.stats.acks++;
297 * @hw: pointer to the HW structure
302 static s32 igb_check_for_rst_pf(struct e1000_hw *hw, u16 vf_number)
310 hw->mbx.stats.rsts++;
318 * @hw: pointer to the HW structure
323 static s32 igb_obtain_mbx_lock_pf(struct e1000_hw *hw, u16 vf_number)
342 * @hw: pointer to the HW structure
349 static s32 igb_write_mbx_pf(struct e1000_hw *hw, u32 *msg, u16 size,
356 ret_val = igb_obtain_mbx_lock_pf(hw, vf_number);
361 igb_check_for_msg_pf(hw, vf_number);
362 igb_check_for_ack_pf(hw, vf_number);
372 hw->mbx.stats.msgs_tx++;
381 * @hw: pointer to the HW structure
390 static s32 igb_read_mbx_pf(struct e1000_hw *hw, u32 *msg, u16 size,
397 ret_val = igb_obtain_mbx_lock_pf(hw, vf_number);
409 hw->mbx.stats.msgs_rx++;
417 * @hw: pointer to the HW structure
419 * Initializes the hw->mbx struct to correct values for pf mailbox
421 s32 igb_init_mbx_params_pf(struct e1000_hw *hw)
423 struct e1000_mbx_info *mbx = &hw->mbx;