[patch 12/16] sky2: fix power settings on Yukon XL

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, <torvalds@...>, <akpm@...>, <alan@...>, Stephen Hemminger <shemminger@...>, David S. Miller <davem@...>
Date: Thursday, November 15, 2007 - 2:41 am

-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Stephen Hemminger <shemminger@linux-foundation.org>

patch ff35164e72648e0bf0b10ec4410c195e8607e88b in mainline.

Make sure PCI register for PHY power gets set correctly.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/net/sky2.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -603,21 +603,22 @@ static void sky2_phy_init(struct sky2_hw
 static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
 {
 	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 };
 
 	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
 	reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
+
 	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];
+
+
 	sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
 	sky2_pci_read32(hw, PCI_DEV_REG1);
 	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);

-- 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 14/16] ipw2100: send WEXT scan events, Greg KH, (Thu Nov 15, 2:41 am)
[patch 12/16] sky2: fix power settings on Yukon XL, Greg KH, (Thu Nov 15, 2:41 am)
[patch 09/16] skge: XM PHY handling fixes, Greg KH, (Thu Nov 15, 2:40 am)
[patch 10/16] sky2: status ring race fix, Greg KH, (Thu Nov 15, 2:40 am)
[patch 03/16] ehea: 64K page kernel support fix, Greg KH, (Thu Nov 15, 2:40 am)
Re: [patch 08/16] skge: fix ram buffer size calculation, Linus Torvalds, (Thu Nov 15, 12:11 pm)
Re: [patch 08/16] skge: fix ram buffer size calculation, Linus Torvalds, (Thu Nov 15, 12:48 pm)
Re: [patch 08/16] skge: fix ram buffer size calculation, Heikki Orsila, (Fri Nov 16, 5:03 pm)
Re: [patch 08/16] skge: fix ram buffer size calculation, Stephen Hemminger, (Thu Nov 15, 12:27 pm)
Re: [patch 08/16] skge: fix ram buffer size calculation, Heikki Orsila, (Thu Nov 15, 5:57 pm)
Re: [patch 08/16] skge: fix ram buffer size calculation, Linus Torvalds, (Thu Nov 15, 12:50 pm)
[patch 04/16] forcedeth msi bugfix, Greg KH, (Thu Nov 15, 2:40 am)
[patch 07/16] Fix L2TP oopses., Greg KH, (Thu Nov 15, 2:40 am)
[patch 05/16] forcedeth: add MCP77 device IDs, Greg KH, (Thu Nov 15, 2:40 am)
[patch 02/16] libertas: fix endianness breakage, Greg KH, (Thu Nov 15, 2:39 am)
[patch 01/16] libertas: more endianness breakage, Greg KH, (Thu Nov 15, 2:39 am)