Lines Matching refs:rar

2296 	/* Make sure we are using a valid rar index range */
2346 /* Make sure we are using a valid rar index range */
2448 u32 rar;
2460 rar = hw->addr_ctrl.rar_used_count;
2461 hw->mac.ops.set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
2462 DEBUGOUT1("Added a secondary address to RAR[%d]\n", rar);
3613 * finds the rar that it is already in; adds to the pool list
3619 u32 rar;
3632 * Either find the mac_id in rar or find the first empty space.
3634 * rar in order to shorten the search. It grows when we add a new
3635 * rar to the top.
3637 for (rar = 0; rar < hw->mac.rar_highwater; rar++) {
3638 rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(rar));
3642 first_empty_rar = rar;
3644 rar_low = IXGBE_READ_REG(hw, IXGBE_RAL(rar));
3650 if (rar < hw->mac.rar_highwater) {
3652 ixgbe_set_vmdq(hw, rar, vmdq);
3655 rar = first_empty_rar;
3656 ixgbe_set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
3657 } else if (rar == hw->mac.rar_highwater) {
3659 ixgbe_set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
3661 } else if (rar >= hw->mac.num_rar_entries) {
3666 * If we found rar[0], make sure the default pool bit (we use pool 0)
3669 if (rar == 0)
3670 ixgbe_clear_vmdq(hw, rar, 0);
3672 return rar;
3678 * @rar: receive address register index to disassociate
3679 * @vmdq: VMDq pool index to remove from the rar
3681 s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
3688 /* Make sure we are using a valid rar index range */
3689 if (rar >= rar_entries) {
3691 "RAR index %d is out of range.\n", rar);
3695 mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3696 mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3706 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
3710 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
3715 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar_lo);
3718 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar_hi);
3721 /* was that the last pool using this rar? */
3722 if (mpsar_lo == 0 && mpsar_hi == 0 && rar != 0)
3723 hw->mac.ops.clear_rar(hw, rar);
3731 * @rar: receive address register index to associate with a VMDq index
3734 s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
3741 /* Make sure we are using a valid rar index range */
3742 if (rar >= rar_entries) {
3744 "RAR index %d is out of range.\n", rar);
3749 mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3751 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar);
3753 mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3755 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar);
3772 u32 rar = hw->mac.san_mac_rar_index;
3777 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 1 << vmdq);
3778 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
3780 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
3781 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 1 << (vmdq - 32));