Lines Matching defs:rar
125 /* RAR, Multicast, VLAN */
2418 /* Make sure we are using a valid rar index range */
2421 "RAR index %d is out of range.\n", index);
2425 /* setup VMDq pool selection before this RAR gets enabled */
2468 /* Make sure we are using a valid rar index range */
2471 "RAR index %d is out of range.\n", index);
2486 /* clear VMDq pool/queue selection for this RAR */
2524 DEBUGOUT("Overriding MAC Address in RAR[0]\n");
2534 /* clear VMDq pool/queue selection for RAR 0 */
2542 DEBUGOUT1("Clearing RAR[1-%d]\n", rar_entries - 1);
2572 u32 rar;
2580 * Place this address in the RAR if there is room,
2584 rar = hw->addr_ctrl.rar_used_count;
2585 hw->mac.ops.set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
2586 DEBUGOUT1("Added a secondary address to RAR[%d]\n", rar);
2623 * don't count RAR[0]
2630 DEBUGOUT1("Clearing RAR[1-%d]\n", uc_addr_in_use+1);
2794 * ixgbe_enable_mc_generic - Enable multicast address in RAR
2797 * Enables multicast address in RAR and the use of the multicast hash table.
2813 * ixgbe_disable_mc_generic - Disable multicast address in RAR
2816 * Disables multicast address in RAR and the use of the multicast hash table.
3739 * ixgbe_insert_mac_addr_generic - Find a RAR for this mac address
3745 * finds the rar that it is already in; adds to the pool list
3751 u32 rar;
3764 * Either find the mac_id in rar or find the first empty space.
3766 * rar in order to shorten the search. It grows when we add a new
3767 * rar to the top.
3769 for (rar = 0; rar < hw->mac.rar_highwater; rar++) {
3770 rar_high = IXGBE_READ_REG(hw, IXGBE_RAH(rar));
3774 first_empty_rar = rar;
3776 rar_low = IXGBE_READ_REG(hw, IXGBE_RAL(rar));
3782 if (rar < hw->mac.rar_highwater) {
3784 ixgbe_set_vmdq(hw, rar, vmdq);
3786 /* stick it into first empty RAR slot we found */
3787 rar = first_empty_rar;
3788 ixgbe_set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
3789 } else if (rar == hw->mac.rar_highwater) {
3791 ixgbe_set_rar(hw, rar, addr, vmdq, IXGBE_RAH_AV);
3793 } else if (rar >= hw->mac.num_rar_entries) {
3798 * If we found rar[0], make sure the default pool bit (we use pool 0)
3801 if (rar == 0)
3802 ixgbe_clear_vmdq(hw, rar, 0);
3804 return rar;
3810 * @rar: receive address register index to disassociate
3811 * @vmdq: VMDq pool index to remove from the rar
3813 s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
3820 /* Make sure we are using a valid rar index range */
3821 if (rar >= rar_entries) {
3823 "RAR index %d is out of range.\n", rar);
3827 mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3828 mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3838 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
3839 mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3842 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
3843 mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3847 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar_lo);
3850 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar_hi);
3853 /* was that the last pool using this rar? */
3855 rar != 0 && rar != hw->mac.san_mac_rar_index)
3856 hw->mac.ops.clear_rar(hw, rar);
3864 * @rar: receive address register index to associate with a VMDq index
3867 s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
3874 /* Make sure we are using a valid rar index range */
3875 if (rar >= rar_entries) {
3877 "RAR index %d is out of range.\n", rar);
3882 mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
3884 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), mpsar);
3886 mpsar = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
3888 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), mpsar);
3897 * MPSAR table needs to be updated for SAN_MAC RAR [hw->mac.san_mac_rar_index]
3905 u32 rar = hw->mac.san_mac_rar_index;
3910 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 1 << vmdq);
3911 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
3913 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
3914 IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 1 << (vmdq - 32));