From d6b54d241c558483302616ac1d997806795513e4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 29 Oct 2009 06:37:07 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/sky2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/net/sky2.c') 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) /* On chips without ram buffer, pause is controled by MAC level */ if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { - sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); - sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); + /* Pause threshold is scaled by 8 in bytes */ + if (hw->chip_id == CHIP_ID_YUKON_FE_P + && hw->chip_rev == CHIP_REV_YU_FE2_A0) + reg = 1568 / 8; + else + reg = 1024 / 8; + sky2_write16(hw, SK_REG(port, RX_GMF_UP_THR), reg); + sky2_write16(hw, SK_REG(port, RX_GMF_LP_THR), 768 / 8); sky2_set_tx_stfwd(hw, port); } -- cgit v1.2.3-59-g8ed1b