aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/e1000_82575.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-07-23 14:08:54 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-26 12:46:52 -0400
commit28fc06f58b1fe567bb86c7d0e3d93137e5c0126e (patch)
tree8f579894d96f4d9aea951f8985f0cd8e5fb6b16c /drivers/net/igb/e1000_82575.c
parent009bc06e5311b48c77b7708d9e226ae0f110373a (diff)
igb: move all multicast addresses into multicast table array
This patch moves all of the multicast addresses out of the free Receive address registers and instead programs them all into the multicast table array. As a result the multicast filtering may not be as precise, but it also greatly reduces the overhead for multicast addresses. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/e1000_82575.c')
-rw-r--r--drivers/net/igb/e1000_82575.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index c4506bf1fca2..5d2c2fbf926b 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -798,65 +798,6 @@ static void igb_init_rx_addrs_82575(struct e1000_hw *hw, u16 rar_count)
798} 798}
799 799
800/** 800/**
801 * igb_update_mc_addr_list - Update Multicast addresses
802 * @hw: pointer to the HW structure
803 * @mc_addr_list: array of multicast addresses to program
804 * @mc_addr_count: number of multicast addresses to program
805 * @rar_used_count: the first RAR register free to program
806 * @rar_count: total number of supported Receive Address Registers
807 *
808 * Updates the Receive Address Registers and Multicast Table Array.
809 * The caller must have a packed mc_addr_list of multicast addresses.
810 * The parameter rar_count will usually be hw->mac.rar_entry_count
811 * unless there are workarounds that change this.
812 **/
813void igb_update_mc_addr_list(struct e1000_hw *hw,
814 u8 *mc_addr_list, u32 mc_addr_count,
815 u32 rar_used_count, u32 rar_count)
816{
817 u32 hash_value;
818 u32 i;
819 u8 addr[6] = {0,0,0,0,0,0};
820 /*
821 * This function is essentially the same as that of
822 * igb_update_mc_addr_list_generic. However it also takes care
823 * of the special case where the register offset of the
824 * second set of RARs begins elsewhere. This is implicitly taken care by
825 * function e1000_rar_set_generic.
826 */
827
828 /*
829 * Load the first set of multicast addresses into the exact
830 * filters (RAR). If there are not enough to fill the RAR
831 * array, clear the filters.
832 */
833 for (i = rar_used_count; i < rar_count; i++) {
834 if (mc_addr_count) {
835 igb_rar_set(hw, mc_addr_list, i);
836 mc_addr_count--;
837 mc_addr_list += ETH_ALEN;
838 } else {
839 igb_rar_set(hw, addr, i);
840 }
841 }
842
843 /* Clear the old settings from the MTA */
844 hw_dbg("Clearing MTA\n");
845 for (i = 0; i < hw->mac.mta_reg_count; i++) {
846 array_wr32(E1000_MTA, i, 0);
847 wrfl();
848 }
849
850 /* Load any remaining multicast addresses into the hash table. */
851 for (; mc_addr_count > 0; mc_addr_count--) {
852 hash_value = igb_hash_mc_addr(hw, mc_addr_list);
853 hw_dbg("Hash value = 0x%03X\n", hash_value);
854 igb_mta_set(hw, hash_value);
855 mc_addr_list += ETH_ALEN;
856 }
857}
858
859/**
860 * igb_shutdown_fiber_serdes_link_82575 - Remove link during power down 801 * igb_shutdown_fiber_serdes_link_82575 - Remove link during power down
861 * @hw: pointer to the HW structure 802 * @hw: pointer to the HW structure
862 * 803 *