linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sky2: dont overwrite settings for PHY Quick link
@ 2012-03-30 17:28 Lino Sanfilippo
  2012-04-01 20:11 ` David Miller
  2012-04-02 22:38 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Lino Sanfilippo @ 2012-03-30 17:28 UTC (permalink / raw)
  To: shemminger; +Cc: netdev, linux-kernel

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>
---
 This applies against 3.3

 drivers/net/ethernet/marvell/sky2.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 760c2b1..d0132d8 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -1756,13 +1756,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);
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sky2: dont overwrite settings for PHY Quick link
  2012-03-30 17:28 [PATCH] sky2: dont overwrite settings for PHY Quick link Lino Sanfilippo
@ 2012-04-01 20:11 ` David Miller
  2012-04-02 22:38 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-04-01 20:11 UTC (permalink / raw)
  To: LinoSanfilippo; +Cc: shemminger, netdev, linux-kernel

From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Date: Fri, 30 Mar 2012 19:28:59 +0200

> 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>

Stephen, ping?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sky2: dont overwrite settings for PHY Quick link
  2012-03-30 17:28 [PATCH] sky2: dont overwrite settings for PHY Quick link Lino Sanfilippo
  2012-04-01 20:11 ` David Miller
@ 2012-04-02 22:38 ` Stephen Hemminger
  2012-04-02 22:42   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2012-04-02 22:38 UTC (permalink / raw)
  To: Lino Sanfilippo; +Cc: netdev, linux-kernel

On Fri, 30 Mar 2012 19:28:59 +0200
Lino Sanfilippo <LinoSanfilippo@gmx.de> wrote:

> 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>
> ---
>  This applies against 3.3
> 
>  drivers/net/ethernet/marvell/sky2.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
> index 760c2b1..d0132d8 100644
> --- a/drivers/net/ethernet/marvell/sky2.c
> +++ b/drivers/net/ethernet/marvell/sky2.c
> @@ -1756,13 +1756,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);

Acked-by: Stephen Hemminger <shemminger@vyattta.com>

This should go to stable as well.  Surprised that gcc did not detect
the "or" of uninitialized value.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sky2: dont overwrite settings for PHY Quick link
  2012-04-02 22:38 ` Stephen Hemminger
@ 2012-04-02 22:42   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-04-02 22:42 UTC (permalink / raw)
  To: shemminger; +Cc: LinoSanfilippo, netdev, linux-kernel

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 2 Apr 2012 15:38:18 -0700

> On Fri, 30 Mar 2012 19:28:59 +0200
> Lino Sanfilippo <LinoSanfilippo@gmx.de> wrote:
> 
>> 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>

Applied and queued up for -stable.

> Surprised that gcc did not detect the "or" of uninitialized value.

Especially since it warns for so much crap it shouldn't :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-02 22:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-30 17:28 [PATCH] sky2: dont overwrite settings for PHY Quick link Lino Sanfilippo
2012-04-01 20:11 ` David Miller
2012-04-02 22:38 ` Stephen Hemminger
2012-04-02 22:42   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).