diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 53839979cfb8..4a009b7b1777 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -510,9 +510,9 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) | |||
510 | ledover &= ~PHY_M_LED_MO_RX; | 510 | ledover &= ~PHY_M_LED_MO_RX; |
511 | } | 511 | } |
512 | 512 | ||
513 | if (hw->chip_id == CHIP_ID_YUKON_EC_U && hw->chip_rev == CHIP_REV_YU_EC_A1) { | 513 | if (hw->chip_id == CHIP_ID_YUKON_EC_U && |
514 | hw->chip_rev == CHIP_REV_YU_EC_U_A1) { | ||
514 | /* apply fixes in PHY AFE */ | 515 | /* apply fixes in PHY AFE */ |
515 | pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR); | ||
516 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 255); | 516 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 255); |
517 | 517 | ||
518 | /* increase differential signal amplitude in 10BASE-T */ | 518 | /* increase differential signal amplitude in 10BASE-T */ |
@@ -524,7 +524,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) | |||
524 | gm_phy_write(hw, port, 0x17, 0x2002); | 524 | gm_phy_write(hw, port, 0x17, 0x2002); |
525 | 525 | ||
526 | /* set page register to 0 */ | 526 | /* set page register to 0 */ |
527 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, pg); | 527 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0); |
528 | } else if (hw->chip_id != CHIP_ID_YUKON_EX) { | 528 | } else if (hw->chip_id != CHIP_ID_YUKON_EX) { |
529 | gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); | 529 | gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); |
530 | 530 | ||
@@ -1561,6 +1561,7 @@ static int sky2_down(struct net_device *dev) | |||
1561 | 1561 | ||
1562 | /* Stop more packets from being queued */ | 1562 | /* Stop more packets from being queued */ |
1563 | netif_stop_queue(dev); | 1563 | netif_stop_queue(dev); |
1564 | netif_carrier_off(dev); | ||
1564 | 1565 | ||
1565 | /* Disable port IRQ */ | 1566 | /* Disable port IRQ */ |
1566 | imask = sky2_read32(hw, B0_IMSK); | 1567 | imask = sky2_read32(hw, B0_IMSK); |
@@ -2165,9 +2166,27 @@ force_update: | |||
2165 | /* fall through */ | 2166 | /* fall through */ |
2166 | #endif | 2167 | #endif |
2167 | case OP_RXCHKS: | 2168 | case OP_RXCHKS: |
2168 | skb = sky2->rx_ring[sky2->rx_next].skb; | 2169 | if (!sky2->rx_csum) |
2169 | skb->ip_summed = CHECKSUM_COMPLETE; | 2170 | break; |
2170 | skb->csum = status & 0xffff; | 2171 | |
2172 | /* Both checksum counters are programmed to start at | ||
2173 | * the same offset, so unless there is a problem they | ||
2174 | * should match. This failure is an early indication that | ||
2175 | * hardware receive checksumming won't work. | ||
2176 | */ | ||
2177 | if (likely(status >> 16 == (status & 0xffff))) { | ||
2178 | skb = sky2->rx_ring[sky2->rx_next].skb; | ||
2179 | skb->ip_summed = CHECKSUM_COMPLETE; | ||
2180 | skb->csum = status & 0xffff; | ||
2181 | } else { | ||
2182 | printk(KERN_NOTICE PFX "%s: hardware receive " | ||
2183 | "checksum problem (status = %#x)\n", | ||
2184 | dev->name, status); | ||
2185 | sky2->rx_csum = 0; | ||
2186 | sky2_write32(sky2->hw, | ||
2187 | Q_ADDR(rxqaddr[le->link], Q_CSR), | ||
2188 | BMU_DIS_RX_CHKSUM); | ||
2189 | } | ||
2171 | break; | 2190 | break; |
2172 | 2191 | ||
2173 | case OP_TXINDEXLE: | 2192 | case OP_TXINDEXLE: |
@@ -3751,6 +3770,11 @@ static int sky2_resume(struct pci_dev *pdev) | |||
3751 | goto out; | 3770 | goto out; |
3752 | 3771 | ||
3753 | pci_enable_wake(pdev, PCI_D0, 0); | 3772 | pci_enable_wake(pdev, PCI_D0, 0); |
3773 | |||
3774 | /* Re-enable all clocks */ | ||
3775 | if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U) | ||
3776 | sky2_pci_write32(hw, PCI_DEV_REG3, 0); | ||
3777 | |||
3754 | sky2_reset(hw); | 3778 | sky2_reset(hw); |
3755 | 3779 | ||
3756 | sky2_write32(hw, B0_IMSK, Y2_IS_BASE); | 3780 | sky2_write32(hw, B0_IMSK, Y2_IS_BASE); |