diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-04-23 01:17:14 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-25 02:08:56 -0400 |
commit | cca87c18ce3357e52facf6519f4ab0fbedd1279f (patch) | |
tree | 1a541b71fd368cc36d5e47b5f07e2bd099f19516 /drivers/net/ibm_newemac | |
parent | 815b97c6b8861f2e539c9ecb44c02b7b8ac11ca4 (diff) |
ibm_newemac: Increase MDIO timeouts
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>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ibm_newemac')
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 490d690b5e7f..5d2108c5ac7c 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -738,7 +738,7 @@ static int __emac_mdio_read(struct emac_instance *dev, u8 id, u8 reg) | |||
738 | rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port); | 738 | rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port); |
739 | 739 | ||
740 | /* Wait for management interface to become idle */ | 740 | /* Wait for management interface to become idle */ |
741 | n = 10; | 741 | n = 20; |
742 | while (!emac_phy_done(dev, in_be32(&p->stacr))) { | 742 | while (!emac_phy_done(dev, in_be32(&p->stacr))) { |
743 | udelay(1); | 743 | udelay(1); |
744 | if (!--n) { | 744 | if (!--n) { |
@@ -763,7 +763,7 @@ static int __emac_mdio_read(struct emac_instance *dev, u8 id, u8 reg) | |||
763 | out_be32(&p->stacr, r); | 763 | out_be32(&p->stacr, r); |
764 | 764 | ||
765 | /* Wait for read to complete */ | 765 | /* Wait for read to complete */ |
766 | n = 100; | 766 | n = 200; |
767 | while (!emac_phy_done(dev, (r = in_be32(&p->stacr)))) { | 767 | while (!emac_phy_done(dev, (r = in_be32(&p->stacr)))) { |
768 | udelay(1); | 768 | udelay(1); |
769 | if (!--n) { | 769 | if (!--n) { |
@@ -810,7 +810,7 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg, | |||
810 | rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port); | 810 | rgmii_get_mdio(dev->rgmii_dev, dev->rgmii_port); |
811 | 811 | ||
812 | /* Wait for management interface to be idle */ | 812 | /* Wait for management interface to be idle */ |
813 | n = 10; | 813 | n = 20; |
814 | while (!emac_phy_done(dev, in_be32(&p->stacr))) { | 814 | while (!emac_phy_done(dev, in_be32(&p->stacr))) { |
815 | udelay(1); | 815 | udelay(1); |
816 | if (!--n) { | 816 | if (!--n) { |
@@ -836,7 +836,7 @@ static void __emac_mdio_write(struct emac_instance *dev, u8 id, u8 reg, | |||
836 | out_be32(&p->stacr, r); | 836 | out_be32(&p->stacr, r); |
837 | 837 | ||
838 | /* Wait for write to complete */ | 838 | /* Wait for write to complete */ |
839 | n = 100; | 839 | n = 200; |
840 | while (!emac_phy_done(dev, in_be32(&p->stacr))) { | 840 | while (!emac_phy_done(dev, in_be32(&p->stacr))) { |
841 | udelay(1); | 841 | udelay(1); |
842 | if (!--n) { | 842 | if (!--n) { |