netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate
@ 2011-10-07  9:36 Florian Fainelli
  2011-10-07 10:24 ` Eric Dumazet
  2011-10-10  3:51 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Fainelli @ 2011-10-07  9:36 UTC (permalink / raw)
  To: davem; +Cc: netdev

Joe reported to me that right after a bring up of a r6040 interface
the ethtool output had no consistent output with respect to link duplex
and speed. Fix this by adding a missing phy_start call in r6040_up and
conversely a phy_stop call in r6040_down to properly initialize phy states.

Reported-by: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 2bbadc0..a128c3d 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
 	iowrite16(adrp[0], ioaddr + MID_0L);
 	iowrite16(adrp[1], ioaddr + MID_0M);
 	iowrite16(adrp[2], ioaddr + MID_0H);
+
+	phy_stop(lp->phydev);
 }
 
 static int r6040_close(struct net_device *dev)
@@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
 	/* Initialize all MAC registers */
 	r6040_init_mac_regs(dev);
 
+	phy_start(lp->phydev);
+
 	return 0;
 }
 
-- 
1.7.4.1

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

* Re: [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate
  2011-10-07  9:36 [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate Florian Fainelli
@ 2011-10-07 10:24 ` Eric Dumazet
  2011-10-07 12:13   ` Florian Fainelli
  2011-10-10  3:51 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2011-10-07 10:24 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: davem, netdev

Le vendredi 07 octobre 2011 à 11:36 +0200, Florian Fainelli a écrit :
> Joe reported to me that right after a bring up of a r6040 interface
> the ethtool output had no consistent output with respect to link duplex
> and speed. Fix this by adding a missing phy_start call in r6040_up and
> conversely a phy_stop call in r6040_down to properly initialize phy states.
> 
> Reported-by: Joe Chou <Joe.Chou@rdc.com.tw>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
> index 2bbadc0..a128c3d 100644
> --- a/drivers/net/ethernet/rdc/r6040.c
> +++ b/drivers/net/ethernet/rdc/r6040.c
> @@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
>  	iowrite16(adrp[0], ioaddr + MID_0L);
>  	iowrite16(adrp[1], ioaddr + MID_0M);
>  	iowrite16(adrp[2], ioaddr + MID_0H);
> +
> +	phy_stop(lp->phydev);
>  }
>  
>  static int r6040_close(struct net_device *dev)
> @@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
>  	/* Initialize all MAC registers */
>  	r6040_init_mac_regs(dev);
>  
> +	phy_start(lp->phydev);
> +
>  	return 0;
>  }
>  

You dont need to submit your patches twice (net and net-next)

If its a bug fix, base your patch against net tree

If its a new feature, against net-next

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

* Re: [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate
  2011-10-07 10:24 ` Eric Dumazet
@ 2011-10-07 12:13   ` Florian Fainelli
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2011-10-07 12:13 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, netdev

On Friday 07 October 2011 12:24:47 Eric Dumazet wrote:
> Le vendredi 07 octobre 2011 à 11:36 +0200, Florian Fainelli a écrit :
> > Joe reported to me that right after a bring up of a r6040 interface
> > the ethtool output had no consistent output with respect to link duplex
> > and speed. Fix this by adding a missing phy_start call in r6040_up and
> > conversely a phy_stop call in r6040_down to properly initialize phy
> > states.
> > 
> > Reported-by: Joe Chou <Joe.Chou@rdc.com.tw>
> > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > ---
> > diff --git a/drivers/net/ethernet/rdc/r6040.c
> > b/drivers/net/ethernet/rdc/r6040.c index 2bbadc0..a128c3d 100644
> > --- a/drivers/net/ethernet/rdc/r6040.c
> > +++ b/drivers/net/ethernet/rdc/r6040.c
> > @@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
> > 
> >  	iowrite16(adrp[0], ioaddr + MID_0L);
> >  	iowrite16(adrp[1], ioaddr + MID_0M);
> >  	iowrite16(adrp[2], ioaddr + MID_0H);
> > 
> > +
> > +	phy_stop(lp->phydev);
> > 
> >  }
> >  
> >  static int r6040_close(struct net_device *dev)
> > 
> > @@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
> > 
> >  	/* Initialize all MAC registers */
> >  	r6040_init_mac_regs(dev);
> > 
> > +	phy_start(lp->phydev);
> > +
> > 
> >  	return 0;
> >  
> >  }
> 
> You dont need to submit your patches twice (net and net-next)
> 
> If its a bug fix, base your patch against net tree
> 
> If its a new feature, against net-next

Allright, thanks for the tip. I just thought that would make it easier for 
David to get this applied (especially after the drivers reorganization).
-- 
Florian

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

* Re: [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate
  2011-10-07  9:36 [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate Florian Fainelli
  2011-10-07 10:24 ` Eric Dumazet
@ 2011-10-10  3:51 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-10-10  3:51 UTC (permalink / raw)
  To: florian; +Cc: netdev

From: Florian Fainelli <florian@openwrt.org>
Date: Fri, 7 Oct 2011 11:36:22 +0200

> Joe reported to me that right after a bring up of a r6040 interface
> the ethtool output had no consistent output with respect to link duplex
> and speed. Fix this by adding a missing phy_start call in r6040_up and
> conversely a phy_stop call in r6040_down to properly initialize phy states.
> 
> Reported-by: Joe Chou <Joe.Chou@rdc.com.tw>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>

Applied.

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

end of thread, other threads:[~2011-10-10  3:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07  9:36 [PATCH 1/2 net-next] r6040: invoke phy_{start,stop} when appropriate Florian Fainelli
2011-10-07 10:24 ` Eric Dumazet
2011-10-07 12:13   ` Florian Fainelli
2011-10-10  3:51 ` 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).