aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2011-11-21 10:01:18 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-22 16:01:34 -0500
commit513aa6ea39adfc9daf5b4bc33b49008733c3eb51 (patch)
tree3b4850d1b93f7e88ed0c9972c36c2e228fb6a3a5
parentf3791cdf33e7d21515de25f5ead0eca38f85ca11 (diff)
tg3: Adjust BD replenish thresholds
The BD replenish thresholds for the 57765 and newer ASIC revs are a little strict. They were tuned for a mode that is currently unused. This patch relaxes the thresholds so that they are set to values more inline with the resources available. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 2497cc4ca89d..09d2003f56fc 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -8171,7 +8171,8 @@ static void tg3_setup_rxbd_thresholds(struct tg3 *tp)
8171 if (!tg3_flag(tp, 5750_PLUS) || 8171 if (!tg3_flag(tp, 5750_PLUS) ||
8172 tg3_flag(tp, 5780_CLASS) || 8172 tg3_flag(tp, 5780_CLASS) ||
8173 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || 8173 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 ||
8174 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752) 8174 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 ||
8175 tg3_flag(tp, 57765_PLUS))
8175 bdcache_maxcnt = TG3_SRAM_RX_STD_BDCACHE_SIZE_5700; 8176 bdcache_maxcnt = TG3_SRAM_RX_STD_BDCACHE_SIZE_5700;
8176 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 8177 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
8177 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) 8178 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)
@@ -8191,10 +8192,7 @@ static void tg3_setup_rxbd_thresholds(struct tg3 *tp)
8191 if (!tg3_flag(tp, JUMBO_CAPABLE) || tg3_flag(tp, 5780_CLASS)) 8192 if (!tg3_flag(tp, JUMBO_CAPABLE) || tg3_flag(tp, 5780_CLASS))
8192 return; 8193 return;
8193 8194
8194 if (!tg3_flag(tp, 5705_PLUS)) 8195 bdcache_maxcnt = TG3_SRAM_RX_JMB_BDCACHE_SIZE_5700;
8195 bdcache_maxcnt = TG3_SRAM_RX_JMB_BDCACHE_SIZE_5700;
8196 else
8197 bdcache_maxcnt = TG3_SRAM_RX_JMB_BDCACHE_SIZE_5717;
8198 8196
8199 host_rep_thresh = max_t(u32, tp->rx_jumbo_pending / 8, 1); 8197 host_rep_thresh = max_t(u32, tp->rx_jumbo_pending / 8, 1);
8200 8198