Lines Matching refs:hw

39 static s32 e1000_init_phy_params_vf(struct e1000_hw *hw);
40 static s32 e1000_init_nvm_params_vf(struct e1000_hw *hw);
41 static void e1000_release_vf(struct e1000_hw *hw);
42 static s32 e1000_acquire_vf(struct e1000_hw *hw);
43 static s32 e1000_setup_link_vf(struct e1000_hw *hw);
44 static s32 e1000_get_bus_info_pcie_vf(struct e1000_hw *hw);
45 static s32 e1000_init_mac_params_vf(struct e1000_hw *hw);
46 static s32 e1000_check_for_link_vf(struct e1000_hw *hw);
47 static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
49 static s32 e1000_init_hw_vf(struct e1000_hw *hw);
50 static s32 e1000_reset_hw_vf(struct e1000_hw *hw);
51 static void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *, u32);
57 * @hw: pointer to the HW structure
61 static s32 e1000_init_phy_params_vf(struct e1000_hw *hw)
64 hw->phy.type = e1000_phy_vf;
65 hw->phy.ops.acquire = e1000_acquire_vf;
66 hw->phy.ops.release = e1000_release_vf;
73 * @hw: pointer to the HW structure
77 static s32 e1000_init_nvm_params_vf(struct e1000_hw *hw)
80 hw->nvm.type = e1000_nvm_none;
81 hw->nvm.ops.acquire = e1000_acquire_vf;
82 hw->nvm.ops.release = e1000_release_vf;
89 * @hw: pointer to the HW structure
91 static s32 e1000_init_mac_params_vf(struct e1000_hw *hw)
93 struct e1000_mac_info *mac = &hw->mac;
103 hw->phy.media_type = e1000_media_type_unknown;
123 /* hw initialization */
142 * @hw: pointer to the HW structure
144 void e1000_init_function_pointers_vf(struct e1000_hw *hw)
148 hw->mac.ops.init_params = e1000_init_mac_params_vf;
149 hw->nvm.ops.init_params = e1000_init_nvm_params_vf;
150 hw->phy.ops.init_params = e1000_init_phy_params_vf;
151 hw->mbx.ops.init_params = e1000_init_mbx_params_vf;
156 * @hw: pointer to the HW structure
162 static s32 e1000_acquire_vf(struct e1000_hw E1000_UNUSEDARG *hw)
169 * @hw: pointer to the HW structure
175 static void e1000_release_vf(struct e1000_hw E1000_UNUSEDARG *hw)
182 * @hw: pointer to the HW structure
186 static s32 e1000_setup_link_vf(struct e1000_hw E1000_UNUSEDARG *hw)
195 * @hw: pointer to the HW structure
199 static s32 e1000_get_bus_info_pcie_vf(struct e1000_hw *hw)
201 struct e1000_bus_info *bus = &hw->bus;
214 * @hw: pointer to the HW structure
221 static s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
228 status = E1000_READ_REG(hw, E1000_STATUS);
253 * @hw: pointer to the HW structure
258 static s32 e1000_reset_hw_vf(struct e1000_hw *hw)
260 struct e1000_mbx_info *mbx = &hw->mbx;
269 ctrl = E1000_READ_REG(hw, E1000_CTRL);
270 E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST);
273 while (!mbx->ops.check_for_rst(hw, 0) && timeout) {
283 mbx->ops.write_posted(hw, msgbuf, 1, 0);
288 ret_val = mbx->ops.read_posted(hw, msgbuf, 3, 0);
292 memcpy(hw->mac.perm_addr, addr, 6);
303 * @hw: pointer to the HW structure
307 static s32 e1000_init_hw_vf(struct e1000_hw *hw)
312 e1000_rar_set_vf(hw, hw->mac.addr, 0);
319 * @hw: pointer to the HW structure
323 static int e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
326 struct e1000_mbx_info *mbx = &hw->mbx;
334 ret_val = mbx->ops.write_posted(hw, msgbuf, 3, 0);
337 ret_val = mbx->ops.read_posted(hw, msgbuf, 3, 0);
344 e1000_read_mac_addr_vf(hw);
351 * @hw: pointer to the HW structure
357 static u32 e1000_hash_mc_addr_vf(struct e1000_hw *hw, u8 *mc_addr)
365 hash_mask = (hw->mac.mta_reg_count * 32) - 1;
380 static void e1000_write_msg_read_ack(struct e1000_hw *hw,
383 struct e1000_mbx_info *mbx = &hw->mbx;
385 s32 retval = mbx->ops.write_posted(hw, msg, size, 0);
388 mbx->ops.read_posted(hw, retmsg, E1000_VFMAILBOX_SIZE, 0);
393 * @hw: pointer to the HW structure
400 void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
430 hash_value = e1000_hash_mc_addr_vf(hw, mc_addr_list);
436 e1000_write_msg_read_ack(hw, msgbuf, E1000_VFMAILBOX_SIZE);
441 * @hw: pointer to the HW structure
445 void e1000_vfta_set_vf(struct e1000_hw *hw, u16 vid, bool set)
455 e1000_write_msg_read_ack(hw, msgbuf, 2);
459 * @hw: pointer to the HW structure
462 void e1000_rlpml_set_vf(struct e1000_hw *hw, u16 max_size)
469 e1000_write_msg_read_ack(hw, msgbuf, 2);
474 * @hw: pointer to the HW structure
478 s32 e1000_promisc_set_vf(struct e1000_hw *hw, enum e1000_promisc_type type)
480 struct e1000_mbx_info *mbx = &hw->mbx;
500 ret_val = mbx->ops.write_posted(hw, &msgbuf, 1, 0);
503 ret_val = mbx->ops.read_posted(hw, &msgbuf, 1, 0);
513 * @hw: pointer to the HW structure
515 static s32 e1000_read_mac_addr_vf(struct e1000_hw *hw)
520 hw->mac.addr[i] = hw->mac.perm_addr[i];
527 * @hw: pointer to the HW structure
533 static s32 e1000_check_for_link_vf(struct e1000_hw *hw)
535 struct e1000_mbx_info *mbx = &hw->mbx;
536 struct e1000_mac_info *mac = &hw->mac;
549 if (!mbx->ops.check_for_rst(hw, 0) || !mbx->timeout)
556 if (!(E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU))
561 if (mbx->ops.read(hw, &in_msg, 1, 0))