Lines Matching refs:hw
51 struct ixgbe_hw *hw = &adapter->hw; in __ixgbe_enable_sriov() local
64 num_vf_macvlans = hw->mac.num_rar_entries - in __ixgbe_enable_sriov()
82 IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN); in __ixgbe_enable_sriov()
93 if ((adapter->hw.mac.type == ixgbe_mac_82599EB) && in __ixgbe_enable_sriov()
181 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_disable_sriov() local
216 IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT, 0); in ixgbe_disable_sriov()
217 gpie = IXGBE_READ_REG(hw, IXGBE_GPIE); in ixgbe_disable_sriov()
219 IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); in ixgbe_disable_sriov()
222 vmdctl = IXGBE_READ_REG(hw, IXGBE_VT_CTL); in ixgbe_disable_sriov()
224 IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl); in ixgbe_disable_sriov()
225 IXGBE_WRITE_FLUSH(hw); in ixgbe_disable_sriov()
328 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_vf_multicasts() local
333 u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf)); in ixgbe_set_vf_multicasts()
356 mta_reg = IXGBE_READ_REG(hw, IXGBE_MTA(vector_reg)); in ixgbe_set_vf_multicasts()
358 IXGBE_WRITE_REG(hw, IXGBE_MTA(vector_reg), mta_reg); in ixgbe_set_vf_multicasts()
361 IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr); in ixgbe_set_vf_multicasts()
369 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_restore_vf_multicasts() local
377 u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(i)); in ixgbe_restore_vf_multicasts()
380 hw->addr_ctrl.mta_in_use++; in ixgbe_restore_vf_multicasts()
383 mta_reg = IXGBE_READ_REG(hw, IXGBE_MTA(vector_reg)); in ixgbe_restore_vf_multicasts()
385 IXGBE_WRITE_REG(hw, IXGBE_MTA(vector_reg), mta_reg); in ixgbe_restore_vf_multicasts()
392 IXGBE_WRITE_REG(hw, IXGBE_VMOLR(i), vmolr); in ixgbe_restore_vf_multicasts()
407 return adapter->hw.mac.ops.set_vfta(&adapter->hw, vid, vf, (bool)add); in ixgbe_set_vf_vlan()
412 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_vf_lpe() local
423 if (adapter->hw.mac.type == ixgbe_mac_82599EB) { in ixgbe_set_vf_lpe()
462 vfre = IXGBE_READ_REG(hw, IXGBE_VFRE(reg_offset)); in ixgbe_set_vf_lpe()
467 IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), vfre); in ixgbe_set_vf_lpe()
482 max_frs = IXGBE_READ_REG(hw, IXGBE_MAXFRS); in ixgbe_set_vf_lpe()
488 IXGBE_WRITE_REG(hw, IXGBE_MAXFRS, max_frs); in ixgbe_set_vf_lpe()
491 e_info(hw, "VF requests change max MTU to %d\n", max_frame); in ixgbe_set_vf_lpe()
496 static void ixgbe_set_vmolr(struct ixgbe_hw *hw, u32 vf, bool aupe) in ixgbe_set_vmolr() argument
498 u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf)); in ixgbe_set_vmolr()
504 IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr); in ixgbe_set_vmolr()
509 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_clear_vmvir() local
511 IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf), 0); in ixgbe_clear_vmvir()
515 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vf_reset_event() local
523 ixgbe_set_vmolr(hw, vf, !vfinfo->pf_vlan); in ixgbe_vf_reset_event()
537 hw->mac.ops.set_vlan_anti_spoofing(hw, true, vf); in ixgbe_vf_reset_event()
633 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_write_qde() local
642 IXGBE_WRITE_FLUSH(hw); in ixgbe_write_qde()
647 IXGBE_WRITE_REG(hw, IXGBE_QDE, reg); in ixgbe_write_qde()
654 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vf_reset_msg() local
675 reg = IXGBE_READ_REG(hw, IXGBE_VFTE(reg_offset)); in ixgbe_vf_reset_msg()
677 IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), reg); in ixgbe_vf_reset_msg()
683 reg = IXGBE_READ_REG(hw, IXGBE_VFRE(reg_offset)); in ixgbe_vf_reset_msg()
689 if (adapter->hw.mac.type == ixgbe_mac_82599EB) { in ixgbe_vf_reset_msg()
702 IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), reg); in ixgbe_vf_reset_msg()
708 reg = IXGBE_READ_REG(hw, IXGBE_VMECM(reg_offset)); in ixgbe_vf_reset_msg()
710 IXGBE_WRITE_REG(hw, IXGBE_VMECM(reg_offset), reg); in ixgbe_vf_reset_msg()
717 IXGBE_WRITE_REG(hw, IXGBE_PVFTDWBAHn(q_per_pool, vf, i), 0); in ixgbe_vf_reset_msg()
718 IXGBE_WRITE_REG(hw, IXGBE_PVFTDWBALn(q_per_pool, vf, i), 0); in ixgbe_vf_reset_msg()
737 msgbuf[3] = hw->mac.mc_filter_type; in ixgbe_vf_reset_msg()
738 ixgbe_write_mbx(hw, msgbuf, IXGBE_VF_PERMADDR_MSG_LEN, vf); in ixgbe_vf_reset_msg()
765 static int ixgbe_find_vlvf_entry(struct ixgbe_hw *hw, u32 vlan) in ixgbe_find_vlvf_entry() argument
776 vlvf = IXGBE_READ_REG(hw, IXGBE_VLVF(regindex)); in ixgbe_find_vlvf_entry()
791 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_vf_vlan_msg() local
821 hw->mac.ops.set_vlan_anti_spoofing(hw, true, vf); in ixgbe_set_vf_vlan_msg()
827 reg_ndx = ixgbe_find_vlvf_entry(hw, vid); in ixgbe_set_vf_vlan_msg()
830 vlvf = IXGBE_READ_REG(hw, IXGBE_VLVF(reg_ndx)); in ixgbe_set_vf_vlan_msg()
835 bits = IXGBE_READ_REG(hw, IXGBE_VLVFB(reg_ndx * 2)); in ixgbe_set_vf_vlan_msg()
837 bits |= IXGBE_READ_REG(hw, in ixgbe_set_vf_vlan_msg()
840 bits = IXGBE_READ_REG(hw, in ixgbe_set_vf_vlan_msg()
843 bits |= IXGBE_READ_REG(hw, IXGBE_VLVFB(reg_ndx * 2)); in ixgbe_set_vf_vlan_msg()
1008 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_rcv_msg_from_vf() local
1011 retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf); in ixgbe_rcv_msg_from_vf()
1023 IXGBE_WRITE_FLUSH(hw); in ixgbe_rcv_msg_from_vf()
1034 ixgbe_write_mbx(hw, msgbuf, 1, vf); in ixgbe_rcv_msg_from_vf()
1080 ixgbe_write_mbx(hw, msgbuf, mbx_size, vf); in ixgbe_rcv_msg_from_vf()
1087 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_rcv_ack_from_vf() local
1092 ixgbe_write_mbx(hw, &msg, 1, vf); in ixgbe_rcv_ack_from_vf()
1097 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_msg_task() local
1102 if (!ixgbe_check_for_rst(hw, vf)) in ixgbe_msg_task()
1106 if (!ixgbe_check_for_msg(hw, vf)) in ixgbe_msg_task()
1110 if (!ixgbe_check_for_ack(hw, vf)) in ixgbe_msg_task()
1117 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_disable_tx_rx() local
1120 IXGBE_WRITE_REG(hw, IXGBE_VFTE(0), 0); in ixgbe_disable_tx_rx()
1121 IXGBE_WRITE_REG(hw, IXGBE_VFTE(1), 0); in ixgbe_disable_tx_rx()
1123 IXGBE_WRITE_REG(hw, IXGBE_VFRE(0), 0); in ixgbe_disable_tx_rx()
1124 IXGBE_WRITE_REG(hw, IXGBE_VFRE(1), 0); in ixgbe_disable_tx_rx()
1129 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_ping_all_vfs() local
1137 ixgbe_write_mbx(hw, &ping, 1, i); in ixgbe_ping_all_vfs()
1162 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_enable_port_vlan() local
1170 ixgbe_set_vmolr(hw, vf, false); in ixgbe_enable_port_vlan()
1172 hw->mac.ops.set_vlan_anti_spoofing(hw, true, vf); in ixgbe_enable_port_vlan()
1176 if (hw->mac.type >= ixgbe_mac_X550) in ixgbe_enable_port_vlan()
1197 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_disable_port_vlan() local
1203 ixgbe_set_vmolr(hw, vf, true); in ixgbe_disable_port_vlan()
1204 hw->mac.ops.set_vlan_anti_spoofing(hw, false, vf); in ixgbe_disable_port_vlan()
1209 if (hw->mac.type >= ixgbe_mac_X550) in ixgbe_disable_port_vlan()
1263 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_vf_rate_limit() local
1289 switch (hw->mac.type) { in ixgbe_set_vf_rate_limit()
1291 IXGBE_WRITE_REG(hw, IXGBE_RTTBCNRM, 0x4); in ixgbe_set_vf_rate_limit()
1294 IXGBE_WRITE_REG(hw, IXGBE_RTTBCNRM, 0x14); in ixgbe_set_vf_rate_limit()
1307 IXGBE_WRITE_REG(hw, IXGBE_RTTDQSEL, reg_idx); in ixgbe_set_vf_rate_limit()
1308 IXGBE_WRITE_REG(hw, IXGBE_RTTBCNRC, bcnrc_val); in ixgbe_set_vf_rate_limit()
1375 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_ndo_set_vf_spoofchk() local
1383 regval = IXGBE_READ_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg)); in ixgbe_ndo_set_vf_spoofchk()
1386 IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), regval); in ixgbe_ndo_set_vf_spoofchk()
1390 regval = IXGBE_READ_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg)); in ixgbe_ndo_set_vf_spoofchk()
1393 IXGBE_WRITE_REG(hw, IXGBE_PFVFSPOOF(vf_target_reg), regval); in ixgbe_ndo_set_vf_spoofchk()
1407 if (adapter->hw.mac.type < ixgbe_mac_82599EB || in ixgbe_ndo_set_vf_rss_query_en()
1408 adapter->hw.mac.type >= ixgbe_mac_X550) in ixgbe_ndo_set_vf_rss_query_en()