summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLino Sanfilippo <LinoSanfilippo@gmx.de>2012-03-30 07:28:59 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-13 08:33:45 -0700
commitdf657e3c1b59def8eb018c95f0951c1898f4cf80 (patch)
treeeb153c39cb8421b124c8ed0e7168ee0e6875e2e0
parent2cdc02f59b9f7b14b72e8f12055f8d26b72dd948 (diff)
sky2: dont overwrite settings for PHY Quick link
[ Upstream commit 2240eb4ae3dc4acff20d1a8947c441c451513e37 ] This patch corrects a bug in function sky2_open() of the Marvell Yukon 2 driver in which the settings for PHY quick link are overwritten. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Acked-by: Stephen Hemminger <shemminger@vyattta.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/marvell/sky2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index f612b35c08ac..7eb8a0023166 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -1766,13 +1766,14 @@ static int sky2_open(struct net_device *dev)
sky2_hw_up(sky2);
+ /* Enable interrupts from phy/mac for port */
+ imask = sky2_read32(hw, B0_IMSK);
+
if (hw->chip_id == CHIP_ID_YUKON_OPT ||
hw->chip_id == CHIP_ID_YUKON_PRM ||
hw->chip_id == CHIP_ID_YUKON_OP_2)
imask |= Y2_IS_PHY_QLNK; /* enable PHY Quick Link */
- /* Enable interrupts from phy/mac for port */
- imask = sky2_read32(hw, B0_IMSK);
imask |= portirq_msk[port];
sky2_write32(hw, B0_IMSK, imask);
sky2_read32(hw, B0_IMSK);