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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 4832f6403721..c9ee8a2c24b5 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -606,20 +606,19 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
606{ 606{
607 struct pci_dev *pdev = hw->pdev; 607 struct pci_dev *pdev = hw->pdev;
608 u32 reg1; 608 u32 reg1;
609 static const u32 phy_power[] 609 static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
610 = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD }; 610 static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA };
611
612 /* looks like this XL is back asswards .. */
613 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
614 onoff = !onoff;
615 611
616 pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1); 612 pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1);
613 /* Turn on/off phy power saving */
617 if (onoff) 614 if (onoff)
618 /* Turn off phy power saving */
619 reg1 &= ~phy_power[port]; 615 reg1 &= ~phy_power[port];
620 else 616 else
621 reg1 |= phy_power[port]; 617 reg1 |= phy_power[port];
622 618
619 if (onoff && hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
620 reg1 |= coma_mode[port];
621
623 pci_write_config_dword(pdev, PCI_DEV_REG1, reg1); 622 pci_write_config_dword(pdev, PCI_DEV_REG1, reg1);
624 pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1); 623 pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1);
625 624