Jesse Keating 2f82dda
From: Takashi Iwai <tiwai@suse.de>
Jesse Keating 2f82dda
Date: Thu, 3 Dec 2009 05:12:02 +0000 (+0000)
Jesse Keating 2f82dda
Subject: net: Add missing TST_CFG_WRITE bits around sky2_pci_write
Jesse Keating 2f82dda
X-Git-Tag: v2.6.33-rc1~59^2~38
Jesse Keating 2f82dda
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=d66f0b20b2f8eac365fadf5ca492efe4ba539446
Jesse Keating 2f82dda
Jesse Keating 2f82dda
net: Add missing TST_CFG_WRITE bits around sky2_pci_write
Jesse Keating 2f82dda
Jesse Keating 2f82dda
Add missing TST_CFG_WRITE bits around sky2_pci_write*() in Optima
Jesse Keating 2f82dda
setup routines.  Without the cfg-write bits, the driver may spew endless
Jesse Keating 2f82dda
link-up messages through qlink irq.
Jesse Keating 2f82dda
Jesse Keating 2f82dda
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jesse Keating 2f82dda
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Keating 2f82dda
---
Jesse Keating 2f82dda
Jesse Keating 2f82dda
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
Jesse Keating 2f82dda
index 050e6b5..013c9f5 100644
Jesse Keating 2f82dda
--- a/drivers/net/sky2.c
Jesse Keating 2f82dda
+++ b/drivers/net/sky2.c
Jesse Keating 2f82dda
@@ -2152,7 +2152,9 @@ static void sky2_qlink_intr(struct sky2_hw *hw)
Jesse Keating 2f82dda
 
Jesse Keating 2f82dda
 	/* reset PHY Link Detect */
Jesse Keating 2f82dda
 	phy = sky2_pci_read16(hw, PSM_CONFIG_REG4);
Jesse Keating 2f82dda
+	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
Jesse Keating 2f82dda
 	sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1);
Jesse Keating 2f82dda
+	sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
Jesse Keating 2f82dda
 
Jesse Keating 2f82dda
 	sky2_link_up(sky2);
Jesse Keating 2f82dda
 }
Jesse Keating 2f82dda
@@ -3082,6 +3084,7 @@ static void sky2_reset(struct sky2_hw *hw)
Jesse Keating 2f82dda
 		reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE;
Jesse Keating 2f82dda
 
Jesse Keating 2f82dda
 		/* reset PHY Link Detect */
Jesse Keating 2f82dda
+		sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
Jesse Keating 2f82dda
 		sky2_pci_write16(hw, PSM_CONFIG_REG4,
Jesse Keating 2f82dda
 				 reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT);
Jesse Keating 2f82dda
 		sky2_pci_write16(hw, PSM_CONFIG_REG4, reg);
Jesse Keating 2f82dda
@@ -3099,6 +3102,7 @@ static void sky2_reset(struct sky2_hw *hw)
Jesse Keating 2f82dda
 			/* restore the PCIe Link Control register */
Jesse Keating 2f82dda
 			sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg);
Jesse Keating 2f82dda
 		}
Jesse Keating 2f82dda
+		sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
Jesse Keating 2f82dda
 
Jesse Keating 2f82dda
 		/* re-enable PEX PM in PEX PHY debug reg. 8 (clear bit 12) */
Jesse Keating 2f82dda
 		sky2_write32(hw, Y2_PEX_PHY_DATA, PEX_DB_ACCESS | (0x08UL << 16));