Lines Matching defs:rar

2393 	/* Make sure we are using a valid rar index range */
2443 /* Make sure we are using a valid rar index range */
2547 u32 rar;
2559 rar = hw->addr_ctrl.rar_used_count;
2560 hw->mac.ops.set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
2561 DEBUGOUT1("Added a secondary address to RAR[%d]\n", rar);
3721 * finds the rar that it is already in; adds to the pool list
3727 u32 rar;
3740 * Either find the mac_id in rar or find the first empty space.
3742 * rar in order to shorten the search. It grows when we add a new
3743 * rar to the top.
3745 for (rar = 0; rar < hw->mac.rar_highwater; rar++) {
3746 rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(rar));
3750 first_empty_rar = rar;
3752 rar_low = IXGBE_READ_REG(hw, IXGBE_RAL(rar));
3758 if (rar < hw->mac.rar_highwater) {
3760 ixgbe_set_vmdq(hw, rar, vmdq);
3763 rar = first_empty_rar;
3764 ixgbe_set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
3765 } else if (rar == hw->mac.rar_highwater) {
3767 ixgbe_set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
3769 } else if (rar >= hw->mac.num_rar_entries) {
3774 * If we found rar[0], make sure the default pool bit (we use pool 0)
3777 if (rar == 0)
3778 ixgbe_clear_vmdq(hw, rar, 0);
3780 return rar;
3786 * @rar: receive address register index to disassociate
3787 * @vmdq: VMDq pool index to remove from the rar
3789 s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
3796 /* Make sure we are using a valid rar index range */
3797 if (rar >= rar_entries) {
3799 "RAR index %d is out of range.\n", rar);
3803 mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3804 mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3814 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
3815 mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3818 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
3819 mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3823 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar_lo);
3826 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar_hi);
3829 /* was that the last pool using this rar? */
3831 rar != 0 && rar != hw->mac.san_mac_rar_index)
3832 hw->mac.ops.clear_rar(hw, rar);
3840 * @rar: receive address register index to associate with a VMDq index
3843 s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
3850 /* Make sure we are using a valid rar index range */
3851 if (rar >= rar_entries) {
3853 "RAR index %d is out of range.\n", rar);
3858 mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3860 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar);
3862 mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3864 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar);
3882 u32 rar = hw->mac.san_mac_rar_index;
3887 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 1 << vmdq);
3888 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
3890 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
3891 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 1 << (vmdq - 32));