diff options
Diffstat (limited to 'drivers/net/sky2.c')
| -rw-r--r-- | drivers/net/sky2.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 626190eb91e7..dc062367a1c8 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
| @@ -623,6 +623,7 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) | |||
| 623 | static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD }; | 623 | static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD }; |
| 624 | static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA }; | 624 | static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA }; |
| 625 | 625 | ||
| 626 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
| 626 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); | 627 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); |
| 627 | /* Turn on/off phy power saving */ | 628 | /* Turn on/off phy power saving */ |
| 628 | if (onoff) | 629 | if (onoff) |
| @@ -634,7 +635,8 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) | |||
| 634 | reg1 |= coma_mode[port]; | 635 | reg1 |= coma_mode[port]; |
| 635 | 636 | ||
| 636 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); | 637 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); |
| 637 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); | 638 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); |
| 639 | sky2_pci_read32(hw, PCI_DEV_REG1); | ||
| 638 | 640 | ||
| 639 | udelay(100); | 641 | udelay(100); |
| 640 | } | 642 | } |
| @@ -1422,6 +1424,7 @@ static int sky2_up(struct net_device *dev) | |||
| 1422 | imask |= portirq_msk[port]; | 1424 | imask |= portirq_msk[port]; |
| 1423 | sky2_write32(hw, B0_IMSK, imask); | 1425 | sky2_write32(hw, B0_IMSK, imask); |
| 1424 | 1426 | ||
| 1427 | sky2_set_multicast(dev); | ||
| 1425 | return 0; | 1428 | return 0; |
| 1426 | 1429 | ||
| 1427 | err_out: | 1430 | err_out: |
| @@ -2436,6 +2439,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
| 2436 | if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { | 2439 | if (status & (Y2_IS_MST_ERR | Y2_IS_IRQ_STAT)) { |
| 2437 | u16 pci_err; | 2440 | u16 pci_err; |
| 2438 | 2441 | ||
| 2442 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
| 2439 | pci_err = sky2_pci_read16(hw, PCI_STATUS); | 2443 | pci_err = sky2_pci_read16(hw, PCI_STATUS); |
| 2440 | if (net_ratelimit()) | 2444 | if (net_ratelimit()) |
| 2441 | dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", | 2445 | dev_err(&pdev->dev, "PCI hardware error (0x%x)\n", |
| @@ -2443,12 +2447,14 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
| 2443 | 2447 | ||
| 2444 | sky2_pci_write16(hw, PCI_STATUS, | 2448 | sky2_pci_write16(hw, PCI_STATUS, |
| 2445 | pci_err | PCI_STATUS_ERROR_BITS); | 2449 | pci_err | PCI_STATUS_ERROR_BITS); |
| 2450 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
| 2446 | } | 2451 | } |
| 2447 | 2452 | ||
| 2448 | if (status & Y2_IS_PCI_EXP) { | 2453 | if (status & Y2_IS_PCI_EXP) { |
| 2449 | /* PCI-Express uncorrectable Error occurred */ | 2454 | /* PCI-Express uncorrectable Error occurred */ |
| 2450 | u32 err; | 2455 | u32 err; |
| 2451 | 2456 | ||
| 2457 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
| 2452 | err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); | 2458 | err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); |
| 2453 | sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, | 2459 | sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS, |
| 2454 | 0xfffffffful); | 2460 | 0xfffffffful); |
| @@ -2456,6 +2462,7 @@ static void sky2_hw_intr(struct sky2_hw *hw) | |||
| 2456 | dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); | 2462 | dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); |
| 2457 | 2463 | ||
| 2458 | sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); | 2464 | sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS); |
| 2465 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
| 2459 | } | 2466 | } |
| 2460 | 2467 | ||
| 2461 | if (status & Y2_HWE_L1_MASK) | 2468 | if (status & Y2_HWE_L1_MASK) |
| @@ -2831,6 +2838,7 @@ static void sky2_reset(struct sky2_hw *hw) | |||
| 2831 | } | 2838 | } |
| 2832 | 2839 | ||
| 2833 | sky2_power_on(hw); | 2840 | sky2_power_on(hw); |
| 2841 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
| 2834 | 2842 | ||
| 2835 | for (i = 0; i < hw->ports; i++) { | 2843 | for (i = 0; i < hw->ports; i++) { |
| 2836 | sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); | 2844 | sky2_write8(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET); |
| @@ -3554,8 +3562,6 @@ static int sky2_set_ringparam(struct net_device *dev, | |||
| 3554 | err = sky2_up(dev); | 3562 | err = sky2_up(dev); |
| 3555 | if (err) | 3563 | if (err) |
| 3556 | dev_close(dev); | 3564 | dev_close(dev); |
| 3557 | else | ||
| 3558 | sky2_set_multicast(dev); | ||
| 3559 | } | 3565 | } |
| 3560 | 3566 | ||
| 3561 | return err; | 3567 | return err; |
| @@ -4389,8 +4395,6 @@ static int sky2_resume(struct pci_dev *pdev) | |||
| 4389 | dev_close(dev); | 4395 | dev_close(dev); |
| 4390 | goto out; | 4396 | goto out; |
| 4391 | } | 4397 | } |
| 4392 | |||
| 4393 | sky2_set_multicast(dev); | ||
| 4394 | } | 4398 | } |
| 4395 | } | 4399 | } |
| 4396 | 4400 | ||
