Subject: [PATCH 3/6] sky2: fix power settings on Yukon XL

From: Stephen Hemminger <[email-masked]>
Date: Thu, 11 Oct 2007 18:19:54 -0700

Make sure PCI register for PHY power gets set correctly.

Signed-off-by: Stephen Hemminger <[email-masked]>

--- a/drivers/net/sky2.c	2007-10-11 18:12:56.000000000 -0700
+++ b/drivers/net/sky2.c	2007-10-11 18:13:00.000000000 -0700
@@ -606,20 +606,19 @@ static void sky2_phy_power(struct sky2_h
 {
 	struct pci_dev *pdev = hw->pdev;
 	u32 reg1;
-	static const u32 phy_power[]
-		= { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
-
-	/* looks like this XL is back asswards .. */
-	if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
-		onoff = !onoff;
+	static const u32 phy_power[] = { PCI_Y2_PHY1_POWD, PCI_Y2_PHY2_POWD };
+	static const u32 coma_mode[] = { PCI_Y2_PHY1_COMA, PCI_Y2_PHY2_COMA };
 
 	pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1);
+	/* Turn on/off phy power saving */
 	if (onoff)
-		/* Turn off phy power saving */
 		reg1 &= ~phy_power[port];
 	else
 		reg1 |= phy_power[port];
 
+	if (onoff && hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
+		reg1 |= coma_mode[port];
+
 	pci_write_config_dword(pdev, PCI_DEV_REG1, reg1);
 	pci_read_config_dword(pdev, PCI_DEV_REG1, &reg1);

-- 
Stephen Hemminger <[email-masked]>