Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/2] PHYLIB: Fix forcing mode reduction
@ 2006-06-05 23:45 Nathaniel Case
  2006-07-24 16:40 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Nathaniel Case @ 2006-06-05 23:45 UTC (permalink / raw)
  To: Andy Fleming; +Cc: netdev, Jeff Garzik, galak

On Mon, 2006-06-05 at 17:08 -0500, Andy Fleming wrote:
> Looks good.  Feel free to send these patches to  
> netdev@vger.kernel.org (you may need to subscribe), and copy Jeff  
> Garzik <jeff@garzik.org>.

This fixes a problem seen when a port without a cable connected would
repeatedly print out "Trying 1000/HALF".  While in the PHY_FORCING
state, the call to phy_read_status() was resetting the value of
phydev->speed and phydev->duplex, preventing it from incrementally
trying the speed/duplex variations.

Since we really just want the link status updated for the PHY_FORCING
state, calling genphy_update_link() instead of phy_read_status() fixes
this issue.

Patch tested on a MPC8540 platform with a BCM5421 PHY.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>

---

--- a/drivers/net/phy/phy.c	2006-06-04 16:01:59.000000000 -0500
+++ b/drivers/net/phy/phy.c	2006-06-05 10:55:31.000000000 -0500
@@ -767,7 +783,7 @@
 			}
 			break;
 		case PHY_FORCING:
-			err = phy_read_status(phydev);
+			err = genphy_update_link(phydev);
 
 			if (err)
 				break;
--- a/drivers/net/phy/phy_device.c	2006-06-04 16:02:08.000000000 -0500
+++ b/drivers/net/phy/phy_device.c	2006-06-04 19:12:26.000000000 -0500
@@ -417,6 +417,7 @@
 
 	return 0;
 }
+EXPORT_SYMBOL(genphy_update_link);
 
 /* genphy_read_status
  *



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

* Re: [PATCH 0/2] PHYLIB: Fix forcing mode reduction
  2006-06-05 23:45 [PATCH 0/2] PHYLIB: Fix forcing mode reduction Nathaniel Case
@ 2006-07-24 16:40 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2006-07-24 16:40 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Andy Fleming, Nathaniel Case, netdev

Jeff,

Any status on accepting this patch, I've got some additional fixes  
that are based on having access to genphy_update_link()

- kumar

On Jun 5, 2006, at 6:45 PM, Nathaniel Case wrote:

> On Mon, 2006-06-05 at 17:08 -0500, Andy Fleming wrote:
>> Looks good.  Feel free to send these patches to
>> netdev@vger.kernel.org (you may need to subscribe), and copy Jeff
>> Garzik <jeff@garzik.org>.
>
> This fixes a problem seen when a port without a cable connected would
> repeatedly print out "Trying 1000/HALF".  While in the PHY_FORCING
> state, the call to phy_read_status() was resetting the value of
> phydev->speed and phydev->duplex, preventing it from incrementally
> trying the speed/duplex variations.
>
> Since we really just want the link status updated for the PHY_FORCING
> state, calling genphy_update_link() instead of phy_read_status() fixes
> this issue.
>
> Patch tested on a MPC8540 platform with a BCM5421 PHY.
>
> Signed-off-by: Nate Case <ncase@xes-inc.com>
> Signed-off-by: Andy Fleming <afleming@freescale.com>
>
> ---
>
> --- a/drivers/net/phy/phy.c	2006-06-04 16:01:59.000000000 -0500
> +++ b/drivers/net/phy/phy.c	2006-06-05 10:55:31.000000000 -0500
> @@ -767,7 +783,7 @@
>  			}
>  			break;
>  		case PHY_FORCING:
> -			err = phy_read_status(phydev);
> +			err = genphy_update_link(phydev);
>
>  			if (err)
>  				break;
> --- a/drivers/net/phy/phy_device.c	2006-06-04 16:02:08.000000000 -0500
> +++ b/drivers/net/phy/phy_device.c	2006-06-04 19:12:26.000000000 -0500
> @@ -417,6 +417,7 @@
>
>  	return 0;
>  }
> +EXPORT_SYMBOL(genphy_update_link);
>
>  /* genphy_read_status
>   *
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2006-07-24 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-05 23:45 [PATCH 0/2] PHYLIB: Fix forcing mode reduction Nathaniel Case
2006-07-24 16:40 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox