diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2011-04-05 10:22:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-06 14:29:05 -0400 |
commit | de9f52300d03915846c2baab27332ec462f7f6b0 (patch) | |
tree | bf2e405e7480bd58afe20b58eaee9fdd091da61e /drivers/net/tg3.h | |
parent | c6e1a0d12ca7b4f22c58e55a16beacfb7d3d8462 (diff) |
tg3: Cleanup extended rx ring size code
Hardcoded values are used in multiple places to describe the maximum rx
ring sizes. This patch replaces those values with preprocessor
constants. This patch also introduces a new TG3_FLG3_LRG_PROD_RING_CAP
to determine if the device is capable of supporting larger ring sizes.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 73884b69b749..4c498ed66059 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -25,9 +25,13 @@ | |||
25 | 25 | ||
26 | #define TG3_RX_INTERNAL_RING_SZ_5906 32 | 26 | #define TG3_RX_INTERNAL_RING_SZ_5906 32 |
27 | 27 | ||
28 | #define RX_STD_MAX_SIZE_5705 512 | 28 | #define TG3_RX_STD_MAX_SIZE_5700 512 |
29 | #define RX_STD_MAX_SIZE_5717 2048 | 29 | #define TG3_RX_STD_MAX_SIZE_5717 2048 |
30 | #define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */ | 30 | #define TG3_RX_JMB_MAX_SIZE_5700 256 |
31 | #define TG3_RX_JMB_MAX_SIZE_5717 1024 | ||
32 | #define TG3_RX_RET_MAX_SIZE_5700 1024 | ||
33 | #define TG3_RX_RET_MAX_SIZE_5705 512 | ||
34 | #define TG3_RX_RET_MAX_SIZE_5717 4096 | ||
31 | 35 | ||
32 | /* First 256 bytes are a mirror of PCI config space. */ | 36 | /* First 256 bytes are a mirror of PCI config space. */ |
33 | #define TG3PCI_VENDOR 0x00000000 | 37 | #define TG3PCI_VENDOR 0x00000000 |
@@ -2897,6 +2901,7 @@ struct tg3 { | |||
2897 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 | 2901 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 |
2898 | #define TG3_FLG3_USE_PHYLIB 0x00000010 | 2902 | #define TG3_FLG3_USE_PHYLIB 0x00000010 |
2899 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 | 2903 | #define TG3_FLG3_MDIOBUS_INITED 0x00000020 |
2904 | #define TG3_FLG3_LRG_PROD_RING_CAP 0x00000080 | ||
2900 | #define TG3_FLG3_RGMII_INBAND_DISABLE 0x00000100 | 2905 | #define TG3_FLG3_RGMII_INBAND_DISABLE 0x00000100 |
2901 | #define TG3_FLG3_RGMII_EXT_IBND_RX_EN 0x00000200 | 2906 | #define TG3_FLG3_RGMII_EXT_IBND_RX_EN 0x00000200 |
2902 | #define TG3_FLG3_RGMII_EXT_IBND_TX_EN 0x00000400 | 2907 | #define TG3_FLG3_RGMII_EXT_IBND_TX_EN 0x00000400 |