aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-10-29 02:37:07 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 01:57:27 -0400
commitd6b54d241c558483302616ac1d997806795513e4 (patch)
treeca94169c75aa3f3459d1f6e7316fb60d4bdce01b /drivers/net/sky2.c
parente91cd2e65f22a80af87367178bed4957fdc45ecd (diff)
sky2: fix receive pause thresholds
Program the receive pause thresholds differently depending on chip version. This cloned from from the vendor (GPL) driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index e961a8696cfb..70524f2658dd 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -926,8 +926,14 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
926 926
927 /* On chips without ram buffer, pause is controled by MAC level */ 927 /* On chips without ram buffer, pause is controled by MAC level */
928 if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { 928 if (!(hw->flags & SKY2_HW_RAM_BUFFER)) {
929 sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); 929 /* Pause threshold is scaled by 8 in bytes */
930 sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); 930 if (hw->chip_id == CHIP_ID_YUKON_FE_P
931 && hw->chip_rev == CHIP_REV_YU_FE2_A0)
932 reg = 1568 / 8;
933 else
934 reg = 1024 / 8;
935 sky2_write16(hw, SK_REG(port, RX_GMF_UP_THR), reg);
936 sky2_write16(hw, SK_REG(port, RX_GMF_LP_THR), 768 / 8);
931 937
932 sky2_set_tx_stfwd(hw, port); 938 sky2_set_tx_stfwd(hw, port);
933 } 939 }