[PATCH] sky2: workarounds for some 88e806x chips
authorStephen Hemminger <shemminger@osdl.org>
Tue, 26 Sep 2006 18:57:39 +0000 (11:57 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 27 Sep 2006 21:56:31 +0000 (17:56 -0400)
Workarounds for 88e806x chips from the vendor driver.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/sky2.c

index d3174ed8e454640c1d133cd156c87535d46111fe..00702dd1530e3b74860c2ff1354a96cf2bc129e3 100644 (file)
@@ -1124,7 +1124,8 @@ static int sky2_up(struct net_device *dev)
        sky2_qset(hw, txqaddr[port]);
 
        /* Set almost empty threshold */
-       if (hw->chip_id == CHIP_ID_YUKON_EC_U && hw->chip_rev == 1)
+       if (hw->chip_id == CHIP_ID_YUKON_EC_U
+           && hw->chip_rev == CHIP_REV_YU_EC_U_A0)
                sky2_write16(hw, Q_ADDR(txqaddr[port], Q_AL), 0x1a0);
 
        sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map,
@@ -1443,6 +1444,13 @@ static int sky2_down(struct net_device *dev)
        sky2_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL),
                     RB_RST_SET | RB_DIS_OP_MD);
 
+       /* WA for dev. #4.209 */
+       if (hw->chip_id == CHIP_ID_YUKON_EC_U
+           && hw->chip_rev == CHIP_REV_YU_EC_U_A1)
+               sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
+                            sky2->speed != SPEED_1000 ?
+                            TX_STFW_ENA : TX_STFW_DIS);
+
        ctrl = gma_read16(hw, port, GM_GP_CTRL);
        ctrl &= ~(GM_GPCR_TX_ENA | GM_GPCR_RX_ENA);
        gma_write16(hw, port, GM_GP_CTRL, ctrl);