aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-09-13 02:28:16 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-09-22 06:09:57 -0400
commita57fe23e240b95282e60d643cd8ada3d2a66d8c6 (patch)
tree107afd7a65497a9afd570c5a8a5d881c1af013f7 /drivers/net/ethernet/intel
parent797fd4be7b6968ea752ae47367ae95454124a698 (diff)
igb: Simplify how we populate the RSS key
Instead of storing the RSS key as a character array we can simplify the configuration by making it a u32 array. This allows us to just write one value per register without any unnecessary operations to construct the value. This change will produce the same exact key, the only difference is that I translated the u8 array to a u32 array which will be correctly ordered on writes to hardware by the cpu_to_le32 operations that are built into the writel calls. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 27688d9d2b64..db6e456688a1 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2835,20 +2835,14 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)
2835 struct e1000_hw *hw = &adapter->hw; 2835 struct e1000_hw *hw = &adapter->hw;
2836 u32 mrqc, rxcsum; 2836 u32 mrqc, rxcsum;
2837 u32 j, num_rx_queues, shift = 0; 2837 u32 j, num_rx_queues, shift = 0;
2838 static const u8 rsshash[40] = { 2838 static const u32 rsskey[10] = { 0xDA565A6D, 0xC20E5B25, 0x3D256741,
2839 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, 0x41, 0x67, 2839 0xB08FA343, 0xCB2BCAD0, 0xB4307BAE,
2840 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, 0xd0, 0xca, 0x2b, 0xcb, 2840 0xA32DCB77, 0x0CF23080, 0x3BB7426A,
2841 0xae, 0x7b, 0x30, 0xb4, 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 2841 0xFA01ACBE };
2842 0xf2, 0x0c, 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa };
2843 2842
2844 /* Fill out hash function seeds */ 2843 /* Fill out hash function seeds */
2845 for (j = 0; j < 10; j++) { 2844 for (j = 0; j < 10; j++)
2846 u32 rsskey = rsshash[(j * 4)]; 2845 wr32(E1000_RSSRK(j), rsskey[j]);
2847 rsskey |= rsshash[(j * 4) + 1] << 8;
2848 rsskey |= rsshash[(j * 4) + 2] << 16;
2849 rsskey |= rsshash[(j * 4) + 3] << 24;
2850 array_wr32(E1000_RSSRK(0), j, rsskey);
2851 }
2852 2846
2853 num_rx_queues = adapter->rss_queues; 2847 num_rx_queues = adapter->rss_queues;
2854 2848