* [PATCH] ibm_newemac: Increase MDIO timeouts
@ 2008-04-23 5:17 Benjamin Herrenschmidt
2008-04-25 6:04 ` Jeff Garzik
2008-04-25 20:57 ` Bill Fink
0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-23 5:17 UTC (permalink / raw)
To: jgarzik; +Cc: super.firetwister, netdev, linuxppc-dev
This patch doubles the MDIO timeouts in EMAC as there are field
cases where they are two short to communicate with some PHYs.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/net/ibm_newemac/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-work.orig/drivers/net/ibm_newemac/core.c 2008-04-23 15:11:16.000000000 +1000
+++ linux-work/drivers/net/ibm_newemac/core.c 2008-04-23 15:14:20.000000000 +1000
@@ -738,7 +738,7 @@ static int __emac_mdio_read(struct emac_
rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port);
/* Wait for management interface to become idle */
- n = 10;
+ n = 20;
while (!emac_phy_done(dev, in_be32(&p->stacr))) {
udelay(1);
if (!--n) {
@@ -763,7 +763,7 @@ static int __emac_mdio_read(struct emac_
out_be32(&p->stacr, r);
/* Wait for read to complete */
- n = 100;
+ n = 200;
while (!emac_phy_done(dev, (r = in_be32(&p->stacr)))) {
udelay(1);
if (!--n) {
@@ -810,7 +810,7 @@ static void __emac_mdio_write(struct ema
rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port);
/* Wait for management interface to be idle */
- n = 10;
+ n = 20;
while (!emac_phy_done(dev, in_be32(&p->stacr))) {
udelay(1);
if (!--n) {
@@ -836,7 +836,7 @@ static void __emac_mdio_write(struct ema
out_be32(&p->stacr, r);
/* Wait for write to complete */
- n = 100;
+ n = 200;
while (!emac_phy_done(dev, in_be32(&p->stacr))) {
udelay(1);
if (!--n) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ibm_newemac: Increase MDIO timeouts
2008-04-23 5:17 [PATCH] ibm_newemac: Increase MDIO timeouts Benjamin Herrenschmidt
@ 2008-04-25 6:04 ` Jeff Garzik
2008-04-25 20:57 ` Bill Fink
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2008-04-25 6:04 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: super.firetwister, netdev, linuxppc-dev
Benjamin Herrenschmidt wrote:
> This patch doubles the MDIO timeouts in EMAC as there are field
> cases where they are two short to communicate with some PHYs.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
applied
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ibm_newemac: Increase MDIO timeouts
2008-04-23 5:17 [PATCH] ibm_newemac: Increase MDIO timeouts Benjamin Herrenschmidt
2008-04-25 6:04 ` Jeff Garzik
@ 2008-04-25 20:57 ` Bill Fink
2008-04-25 22:22 ` Benjamin Herrenschmidt
1 sibling, 1 reply; 6+ messages in thread
From: Bill Fink @ 2008-04-25 20:57 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: super.firetwister, netdev, jgarzik, linuxppc-dev
On Wed, 23 Apr 2008, Benjamin Herrenschmidt wrote:
> This patch doubles the MDIO timeouts in EMAC as there are field
> cases where they are two short to communicate with some PHYs.
I guess them being "two short" is why they needed to be doubled. :-)
-Bill
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ibm_newemac: Increase MDIO timeouts
2008-04-25 20:57 ` Bill Fink
@ 2008-04-25 22:22 ` Benjamin Herrenschmidt
2008-04-25 23:58 ` Josh Boyer
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-25 22:22 UTC (permalink / raw)
To: Bill Fink; +Cc: super.firetwister, netdev, jgarzik, linuxppc-dev
On Fri, 2008-04-25 at 16:57 -0400, Bill Fink wrote:
> On Wed, 23 Apr 2008, Benjamin Herrenschmidt wrote:
>
> > This patch doubles the MDIO timeouts in EMAC as there are field
> > cases where they are two short to communicate with some PHYs.
>
> I guess them being "two short" is why they needed to be doubled. :-)
Well, in that case, it makes sense, it's still pretty short and better
safe than sorry. On day I may look at actually measuring PHYs and see if
it's worth trying to do sleeping waits in there.
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ibm_newemac: Increase MDIO timeouts
2008-04-25 22:22 ` Benjamin Herrenschmidt
@ 2008-04-25 23:58 ` Josh Boyer
2008-04-26 3:35 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 6+ messages in thread
From: Josh Boyer @ 2008-04-25 23:58 UTC (permalink / raw)
To: benh; +Cc: super.firetwister, netdev, Bill Fink, jgarzik, linuxppc-dev
On Sat, 26 Apr 2008 08:22:38 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Fri, 2008-04-25 at 16:57 -0400, Bill Fink wrote:
> > On Wed, 23 Apr 2008, Benjamin Herrenschmidt wrote:
> >
> > > This patch doubles the MDIO timeouts in EMAC as there are field
> > > cases where they are two short to communicate with some PHYs.
> >
> > I guess them being "two short" is why they needed to be doubled. :-)
>
> Well, in that case, it makes sense, it's still pretty short and better
> safe than sorry. On day I may look at actually measuring PHYs and see if
> it's worth trying to do sleeping waits in there.
I think you missed Bill's joke. Read your original email and spot the
typo, then read Bill's pun.
And stop emailing before you eat breakfast ;)
josh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ibm_newemac: Increase MDIO timeouts
2008-04-25 23:58 ` Josh Boyer
@ 2008-04-26 3:35 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-26 3:35 UTC (permalink / raw)
To: Josh Boyer; +Cc: super.firetwister, netdev, Bill Fink, jgarzik, linuxppc-dev
On Fri, 2008-04-25 at 18:58 -0500, Josh Boyer wrote:
> > > I guess them being "two short" is why they needed to be
> doubled. :-)
> >
> > Well, in that case, it makes sense, it's still pretty short and
> better
> > safe than sorry. On day I may look at actually measuring PHYs and
> see if
> > it's worth trying to do sleeping waits in there.
>
> I think you missed Bill's joke. Read your original email and spot the
> typo, then read Bill's pun.
>
> And stop emailing before you eat breakfast ;)
Hrm ... yeah allright I missed my initial typo and I missed Bill
joke :-) looks like another case of replying while still half asleep ...
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-26 3:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 5:17 [PATCH] ibm_newemac: Increase MDIO timeouts Benjamin Herrenschmidt
2008-04-25 6:04 ` Jeff Garzik
2008-04-25 20:57 ` Bill Fink
2008-04-25 22:22 ` Benjamin Herrenschmidt
2008-04-25 23:58 ` Josh Boyer
2008-04-26 3:35 ` Benjamin Herrenschmidt
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).