aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index d8ec4c11fd49..5b97edb7a35f 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -226,7 +226,7 @@ static void sky2_power_on(struct sky2_hw *hw)
226 /* disable Core Clock Division, */ 226 /* disable Core Clock Division, */
227 sky2_write32(hw, B2_Y2_CLK_CTRL, Y2_CLK_DIV_DIS); 227 sky2_write32(hw, B2_Y2_CLK_CTRL, Y2_CLK_DIV_DIS);
228 228
229 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) 229 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > CHIP_REV_YU_XL_A1)
230 /* enable bits are inverted */ 230 /* enable bits are inverted */
231 sky2_write8(hw, B2_Y2_CLK_GATE, 231 sky2_write8(hw, B2_Y2_CLK_GATE,
232 Y2_PCI_CLK_LNK1_DIS | Y2_COR_CLK_LNK1_DIS | 232 Y2_PCI_CLK_LNK1_DIS | Y2_COR_CLK_LNK1_DIS |
@@ -268,7 +268,7 @@ static void sky2_power_on(struct sky2_hw *hw)
268 268
269static void sky2_power_aux(struct sky2_hw *hw) 269static void sky2_power_aux(struct sky2_hw *hw)
270{ 270{
271 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) 271 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > CHIP_REV_YU_XL_A1)
272 sky2_write8(hw, B2_Y2_CLK_GATE, 0); 272 sky2_write8(hw, B2_Y2_CLK_GATE, 0);
273 else 273 else
274 /* enable bits are inverted */ 274 /* enable bits are inverted */
@@ -651,7 +651,7 @@ static void sky2_phy_power_up(struct sky2_hw *hw, unsigned port)
651 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); 651 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
652 reg1 &= ~phy_power[port]; 652 reg1 &= ~phy_power[port];
653 653
654 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) 654 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > CHIP_REV_YU_XL_A1)
655 reg1 |= coma_mode[port]; 655 reg1 |= coma_mode[port];
656 656
657 sky2_pci_write32(hw, PCI_DEV_REG1, reg1); 657 sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
@@ -823,7 +823,9 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
823 823
824 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_CLR); 824 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_CLR);
825 825
826 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0 && port == 1) { 826 if (hw->chip_id == CHIP_ID_YUKON_XL &&
827 hw->chip_rev == CHIP_REV_YU_XL_A0 &&
828 port == 1) {
827 /* WA DEV_472 -- looks like crossed wires on port 2 */ 829 /* WA DEV_472 -- looks like crossed wires on port 2 */
828 /* clear GMAC 1 Control reset */ 830 /* clear GMAC 1 Control reset */
829 sky2_write8(hw, SK_REG(0, GMAC_CTRL), GMC_RST_CLR); 831 sky2_write8(hw, SK_REG(0, GMAC_CTRL), GMC_RST_CLR);
@@ -877,6 +879,10 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
877 if (hw->dev[port]->mtu > ETH_DATA_LEN) 879 if (hw->dev[port]->mtu > ETH_DATA_LEN)
878 reg |= GM_SMOD_JUMBO_ENA; 880 reg |= GM_SMOD_JUMBO_ENA;
879 881
882 if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
883 hw->chip_rev == CHIP_REV_YU_EC_U_B1)
884 reg |= GM_NEW_FLOW_CTRL;
885
880 gma_write16(hw, port, GM_SERIAL_MODE, reg); 886 gma_write16(hw, port, GM_SERIAL_MODE, reg);
881 887
882 /* virtual address for data */ 888 /* virtual address for data */
@@ -1413,8 +1419,7 @@ static void sky2_rx_start(struct sky2_port *sky2)
1413 /* These chips have no ram buffer? 1419 /* These chips have no ram buffer?
1414 * MAC Rx RAM Read is controlled by hardware */ 1420 * MAC Rx RAM Read is controlled by hardware */
1415 if (hw->chip_id == CHIP_ID_YUKON_EC_U && 1421 if (hw->chip_id == CHIP_ID_YUKON_EC_U &&
1416 (hw->chip_rev == CHIP_REV_YU_EC_U_A1 || 1422 hw->chip_rev > CHIP_REV_YU_EC_U_A0)
1417 hw->chip_rev == CHIP_REV_YU_EC_U_B0))
1418 sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS); 1423 sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS);
1419 1424
1420 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1); 1425 sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1);
@@ -2141,7 +2146,8 @@ static void sky2_phy_intr(struct sky2_hw *hw, unsigned port)
2141 istatus, phystat); 2146 istatus, phystat);
2142 2147
2143 if (istatus & PHY_M_IS_AN_COMPL) { 2148 if (istatus & PHY_M_IS_AN_COMPL) {
2144 if (sky2_autoneg_done(sky2, phystat) == 0) 2149 if (sky2_autoneg_done(sky2, phystat) == 0 &&
2150 !netif_carrier_ok(dev))
2145 sky2_link_up(sky2); 2151 sky2_link_up(sky2);
2146 goto out; 2152 goto out;
2147 } 2153 }
@@ -3621,7 +3627,7 @@ static void sky2_set_multicast(struct net_device *dev)
3621 struct sky2_port *sky2 = netdev_priv(dev); 3627 struct sky2_port *sky2 = netdev_priv(dev);
3622 struct sky2_hw *hw = sky2->hw; 3628 struct sky2_hw *hw = sky2->hw;
3623 unsigned port = sky2->port; 3629 unsigned port = sky2->port;
3624 struct dev_mc_list *list; 3630 struct netdev_hw_addr *ha;
3625 u16 reg; 3631 u16 reg;
3626 u8 filter[8]; 3632 u8 filter[8];
3627 int rx_pause; 3633 int rx_pause;
@@ -3645,8 +3651,8 @@ static void sky2_set_multicast(struct net_device *dev)
3645 if (rx_pause) 3651 if (rx_pause)
3646 sky2_add_filter(filter, pause_mc_addr); 3652 sky2_add_filter(filter, pause_mc_addr);
3647 3653
3648 netdev_for_each_mc_addr(list, dev) 3654 netdev_for_each_mc_addr(ha, dev)
3649 sky2_add_filter(filter, list->dmi_addr); 3655 sky2_add_filter(filter, ha->addr);
3650 } 3656 }
3651 3657
3652 gma_write16(hw, port, GM_MC_ADDR_H1, 3658 gma_write16(hw, port, GM_MC_ADDR_H1,