aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.h
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-04-20 03:57:36 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-21 20:05:55 -0400
commiteb07a9408e05f67caa671bdf2a509a4d2bd05abf (patch)
treee17b801356317ffa1225c2cb19e9580649d528fb /drivers/net/tg3.h
parent4d95847381228639844c7197deb8b2211274ef22 (diff)
tg3: Adjust rx prod ring bd replenish thresholds
The oldest tg3 devices had large rx producer ring BD caches. Back then, it made sense to make the BD cache replenish threshold only a function of the number of rx buffers posted by the driver. Since then, the BD cache sizes have shrunk to 25% of their original size and, in some cases, the ring sizes have quadrupled in size. Under such conditions, static BD cache replenish thresholds no longer match the hardware constraints. This patch attempts to factor in the BD cache size into the bd cache replenish strategy, taking the existing hardware bugs into account. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r--drivers/net/tg3.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index db50bfe046e4..dd331f8d3f7a 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -23,8 +23,6 @@
23#define TG3_BDINFO_NIC_ADDR 0xcUL /* 32-bit */ 23#define TG3_BDINFO_NIC_ADDR 0xcUL /* 32-bit */
24#define TG3_BDINFO_SIZE 0x10UL 24#define TG3_BDINFO_SIZE 0x10UL
25 25
26#define TG3_RX_INTERNAL_RING_SZ_5906 32
27
28#define TG3_RX_STD_MAX_SIZE_5700 512 26#define TG3_RX_STD_MAX_SIZE_5700 512
29#define TG3_RX_STD_MAX_SIZE_5717 2048 27#define TG3_RX_STD_MAX_SIZE_5717 2048
30#define TG3_RX_JMB_MAX_SIZE_5700 256 28#define TG3_RX_JMB_MAX_SIZE_5700 256
@@ -2136,6 +2134,13 @@
2136#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000 2134#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000
2137#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000 2135#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000
2138 2136
2137#define TG3_SRAM_RX_STD_BDCACHE_SIZE_5700 128
2138#define TG3_SRAM_RX_STD_BDCACHE_SIZE_5755 64
2139#define TG3_SRAM_RX_STD_BDCACHE_SIZE_5906 32
2140
2141#define TG3_SRAM_RX_JMB_BDCACHE_SIZE_5700 64
2142#define TG3_SRAM_RX_JMB_BDCACHE_SIZE_5717 16
2143
2139 2144
2140/* Currently this is fixed. */ 2145/* Currently this is fixed. */
2141#define TG3_PHY_MII_ADDR 0x01 2146#define TG3_PHY_MII_ADDR 0x01