• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/ixgbevf/

Lines Matching refs:hw

32  *  @hw: pointer to the HW structure
36 static s32 ixgbevf_poll_for_msg(struct ixgbe_hw *hw)
38 struct ixgbe_mbx_info *mbx = &hw->mbx;
41 while (countdown && mbx->ops.check_for_msg(hw)) {
55 * @hw: pointer to the HW structure
59 static s32 ixgbevf_poll_for_ack(struct ixgbe_hw *hw)
61 struct ixgbe_mbx_info *mbx = &hw->mbx;
64 while (countdown && mbx->ops.check_for_ack(hw)) {
78 * @hw: pointer to the HW structure
85 static s32 ixgbevf_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
87 struct ixgbe_mbx_info *mbx = &hw->mbx;
90 ret_val = ixgbevf_poll_for_msg(hw);
94 ret_val = mbx->ops.read(hw, msg, size);
101 * @hw: pointer to the HW structure
108 static s32 ixgbevf_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
110 struct ixgbe_mbx_info *mbx = &hw->mbx;
114 ret_val = mbx->ops.write(hw, msg, size);
118 ret_val = ixgbevf_poll_for_ack(hw);
125 * @hw: pointer to the HW structure
130 static u32 ixgbevf_read_v2p_mailbox(struct ixgbe_hw *hw)
132 u32 v2p_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX);
134 v2p_mailbox |= hw->mbx.v2p_mailbox;
135 hw->mbx.v2p_mailbox |= v2p_mailbox & IXGBE_VFMAILBOX_R2C_BITS;
142 * @hw: pointer to the HW structure
148 static s32 ixgbevf_check_for_bit_vf(struct ixgbe_hw *hw, u32 mask)
150 u32 v2p_mailbox = ixgbevf_read_v2p_mailbox(hw);
156 hw->mbx.v2p_mailbox &= ~mask;
163 * @hw: pointer to the HW structure
167 static s32 ixgbevf_check_for_msg_vf(struct ixgbe_hw *hw)
171 if (!ixgbevf_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFSTS)) {
173 hw->mbx.stats.reqs++;
181 * @hw: pointer to the HW structure
185 static s32 ixgbevf_check_for_ack_vf(struct ixgbe_hw *hw)
189 if (!ixgbevf_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFACK)) {
191 hw->mbx.stats.acks++;
199 * @hw: pointer to the HW structure
203 static s32 ixgbevf_check_for_rst_vf(struct ixgbe_hw *hw)
207 if (!ixgbevf_check_for_bit_vf(hw, (IXGBE_VFMAILBOX_RSTD |
210 hw->mbx.stats.rsts++;
218 * @hw: pointer to the HW structure
222 static s32 ixgbevf_obtain_mbx_lock_vf(struct ixgbe_hw *hw)
227 IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_VFU);
230 if (ixgbevf_read_v2p_mailbox(hw) & IXGBE_VFMAILBOX_VFU)
238 * @hw: pointer to the HW structure
244 static s32 ixgbevf_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size)
251 ret_val = ixgbevf_obtain_mbx_lock_vf(hw);
256 ixgbevf_check_for_msg_vf(hw);
257 ixgbevf_check_for_ack_vf(hw);
261 IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]);
264 hw->mbx.stats.msgs_tx++;
267 IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_REQ);
275 * @hw: pointer to the HW structure
281 static s32 ixgbevf_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size)
287 ret_val = ixgbevf_obtain_mbx_lock_vf(hw);
293 msg[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_VFMBMEM, i);
296 IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_ACK);
299 hw->mbx.stats.msgs_rx++;
307 * @hw: pointer to the HW structure
309 * Initializes the hw->mbx struct to correct values for vf mailbox
311 s32 ixgbevf_init_mbx_params_vf(struct ixgbe_hw *hw)
313 struct ixgbe_mbx_info *mbx = &hw->mbx;