tg3: Add RSS support

This patch adds code needed to enable RSS.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Matt Carlson
2009-09-01 13:13:00 +00:00
committed by David S. Miller
parent b6080e1260
commit baf8a94a57
2 changed files with 76 additions and 2 deletions

View File

@@ -446,6 +446,12 @@
#define RX_MODE_PROMISC 0x00000100
#define RX_MODE_NO_CRC_CHECK 0x00000200
#define RX_MODE_KEEP_VLAN_TAG 0x00000400
#define RX_MODE_RSS_IPV4_HASH_EN 0x00010000
#define RX_MODE_RSS_TCP_IPV4_HASH_EN 0x00020000
#define RX_MODE_RSS_IPV6_HASH_EN 0x00040000
#define RX_MODE_RSS_TCP_IPV6_HASH_EN 0x00080000
#define RX_MODE_RSS_ITBL_HASH_BITS_7 0x00700000
#define RX_MODE_RSS_ENABLE 0x00800000
#define RX_MODE_IPV6_CSUM_ENABLE 0x01000000
#define MAC_RX_STATUS 0x0000046c
#define RX_STATUS_REMOTE_TX_XOFFED 0x00000001
@@ -690,7 +696,22 @@
/* 0x5b8 --> 0x600 unused */
#define MAC_TX_MAC_STATE_BASE 0x00000600 /* 16 bytes */
#define MAC_RX_MAC_STATE_BASE 0x00000610 /* 20 bytes */
/* 0x624 --> 0x800 unused */
/* 0x624 --> 0x670 unused */
#define MAC_RSS_INDIR_TBL_0 0x00000630
#define MAC_RSS_HASH_KEY_0 0x00000670
#define MAC_RSS_HASH_KEY_1 0x00000674
#define MAC_RSS_HASH_KEY_2 0x00000678
#define MAC_RSS_HASH_KEY_3 0x0000067c
#define MAC_RSS_HASH_KEY_4 0x00000680
#define MAC_RSS_HASH_KEY_5 0x00000684
#define MAC_RSS_HASH_KEY_6 0x00000688
#define MAC_RSS_HASH_KEY_7 0x0000068c
#define MAC_RSS_HASH_KEY_8 0x00000690
#define MAC_RSS_HASH_KEY_9 0x00000694
/* 0x698 --> 0x800 unused */
#define MAC_TX_STATS_OCTETS 0x00000800
#define MAC_TX_STATS_RESV1 0x00000804
#define MAC_TX_STATS_COLLISIONS 0x00000808
@@ -1465,6 +1486,7 @@
#define MSGINT_MODE 0x00006000
#define MSGINT_MODE_RESET 0x00000001
#define MSGINT_MODE_ENABLE 0x00000002
#define MSGINT_MODE_MULTIVEC_EN 0x00000080
#define MSGINT_STATUS 0x00006004
#define MSGINT_FIFO 0x00006008
/* 0x600c --> 0x6400 unused */
@@ -2704,6 +2726,7 @@ struct tg3 {
#define TG3_FLG3_NO_NVRAM 0x00004000
#define TG3_FLG3_TOGGLE_10_100_L1PLLPD 0x00008000
#define TG3_FLG3_PHY_IS_FET 0x00010000
#define TG3_FLG3_ENABLE_RSS 0x00020000
struct timer_list timer;
u16 timer_counter;