]> git.baikalelectronics.ru Git - kernel.git/commit
tg3: Adjust rx prod ring bd replenish thresholds
authorMatt Carlson <mcarlson@broadcom.com>
Wed, 20 Apr 2011 07:57:36 +0000 (07:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Apr 2011 00:05:55 +0000 (17:05 -0700)
commit677fdbbe8b4cdc88ad21e251ffbd8fc6e9af73e5
treee17b801356317ffa1225c2cb19e9580649d528fb
parent270c3e317ef86b32ceed4531d684a2f4397bf17e
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>
drivers/net/tg3.c
drivers/net/tg3.h