diff options
| author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-29 13:03:54 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-29 13:03:54 -0500 |
| commit | 6c722e90d7ede7db2d2b28a3cc69a8545db67ea1 (patch) | |
| tree | 2473530190795c11f841db37b7d74df9bcc0416b /drivers/net/sky2.c | |
| parent | 007fb598b4674de82492a9961e82826875012229 (diff) | |
| parent | 81f4e6c190a0fa016fd7eecaf76a5f95d121afc2 (diff) | |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (42 commits)
r8169: extraneous Cmd{Tx/Rx}Enb write
forcedeth: modified comment header
NetXen: Reducing ring sizes for IOMMU issue.
NetXen: Fix for PPC machines.
NetXen: work queue fixes.
NetXen: Link status message correction for quad port cards.
NetXen: Multiple adapter fix.
NetXen: Using correct CHECKSUM flag.
NetXen: driver reload fix for newer firmware.
NetXen: Adding new device ids.
PHY probe not working properly for ibm_emac (PPC4xx)
ep93xx: some minor cleanups to the ep93xx eth driver
sky2: phy power down needs PCI config write enabled
sky2: power management/MSI workaround
sky2: dual port NAPI problem
via-velocity uses INET interfaces
e1000: Do not truncate TSO TCP header with 82544 workaround
myri10ge: handle failures in suspend and resume
myri10ge: no need to save MSI and PCIe state in the driver
myri10ge: make msi configurable at runtime through sysfs
...
Diffstat (limited to 'drivers/net/sky2.c')
| -rw-r--r-- | drivers/net/sky2.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index fb1d2c30c1bb..a6601e8d423c 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
| @@ -569,8 +569,8 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) | |||
| 569 | if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) | 569 | if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) |
| 570 | onoff = !onoff; | 570 | onoff = !onoff; |
| 571 | 571 | ||
| 572 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON); | ||
| 572 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); | 573 | reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); |
| 573 | |||
| 574 | if (onoff) | 574 | if (onoff) |
| 575 | /* Turn off phy power saving */ | 575 | /* Turn off phy power saving */ |
| 576 | reg1 &= ~phy_power[port]; | 576 | reg1 &= ~phy_power[port]; |
| @@ -579,6 +579,7 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff) | |||
| 579 | 579 | ||
| 580 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); | 580 | sky2_pci_write32(hw, PCI_DEV_REG1, reg1); |
| 581 | sky2_pci_read32(hw, PCI_DEV_REG1); | 581 | sky2_pci_read32(hw, PCI_DEV_REG1); |
| 582 | sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF); | ||
| 582 | udelay(100); | 583 | udelay(100); |
| 583 | } | 584 | } |
| 584 | 585 | ||
| @@ -1511,6 +1512,13 @@ static int sky2_down(struct net_device *dev) | |||
| 1511 | imask &= ~portirq_msk[port]; | 1512 | imask &= ~portirq_msk[port]; |
| 1512 | sky2_write32(hw, B0_IMSK, imask); | 1513 | sky2_write32(hw, B0_IMSK, imask); |
| 1513 | 1514 | ||
| 1515 | /* | ||
| 1516 | * Both ports share the NAPI poll on port 0, so if necessary undo the | ||
| 1517 | * the disable that is done in dev_close. | ||
| 1518 | */ | ||
| 1519 | if (sky2->port == 0 && hw->ports > 1) | ||
| 1520 | netif_poll_enable(dev); | ||
| 1521 | |||
| 1514 | sky2_gmac_reset(hw, port); | 1522 | sky2_gmac_reset(hw, port); |
| 1515 | 1523 | ||
| 1516 | /* Stop transmitter */ | 1524 | /* Stop transmitter */ |
| @@ -3631,6 +3639,29 @@ static int sky2_resume(struct pci_dev *pdev) | |||
| 3631 | out: | 3639 | out: |
| 3632 | return err; | 3640 | return err; |
| 3633 | } | 3641 | } |
| 3642 | |||
| 3643 | /* BIOS resume runs after device (it's a bug in PM) | ||
| 3644 | * as a temporary workaround on suspend/resume leave MSI disabled | ||
| 3645 | */ | ||
| 3646 | static int sky2_suspend_late(struct pci_dev *pdev, pm_message_t state) | ||
| 3647 | { | ||
| 3648 | struct sky2_hw *hw = pci_get_drvdata(pdev); | ||
| 3649 | |||
| 3650 | free_irq(pdev->irq, hw); | ||
| 3651 | if (hw->msi) { | ||
| 3652 | pci_disable_msi(pdev); | ||
| 3653 | hw->msi = 0; | ||
| 3654 | } | ||
| 3655 | return 0; | ||
| 3656 | } | ||
| 3657 | |||
| 3658 | static int sky2_resume_early(struct pci_dev *pdev) | ||
| 3659 | { | ||
| 3660 | struct sky2_hw *hw = pci_get_drvdata(pdev); | ||
| 3661 | struct net_device *dev = hw->dev[0]; | ||
| 3662 | |||
| 3663 | return request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw); | ||
| 3664 | } | ||
| 3634 | #endif | 3665 | #endif |
| 3635 | 3666 | ||
| 3636 | static struct pci_driver sky2_driver = { | 3667 | static struct pci_driver sky2_driver = { |
| @@ -3641,6 +3672,8 @@ static struct pci_driver sky2_driver = { | |||
| 3641 | #ifdef CONFIG_PM | 3672 | #ifdef CONFIG_PM |
| 3642 | .suspend = sky2_suspend, | 3673 | .suspend = sky2_suspend, |
| 3643 | .resume = sky2_resume, | 3674 | .resume = sky2_resume, |
| 3675 | .suspend_late = sky2_suspend_late, | ||
| 3676 | .resume_early = sky2_resume_early, | ||
| 3644 | #endif | 3677 | #endif |
| 3645 | }; | 3678 | }; |
| 3646 | 3679 | ||
