aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/cassini.c4
-rw-r--r--drivers/net/sungem_phy.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 840b3d1a22f5..bbbc3bb08aa5 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -806,7 +806,7 @@ static int cas_reset_mii_phy(struct cas *cp)
806 806
807 cas_phy_write(cp, MII_BMCR, BMCR_RESET); 807 cas_phy_write(cp, MII_BMCR, BMCR_RESET);
808 udelay(100); 808 udelay(100);
809 while (limit--) { 809 while (--limit) {
810 val = cas_phy_read(cp, MII_BMCR); 810 val = cas_phy_read(cp, MII_BMCR);
811 if ((val & BMCR_RESET) == 0) 811 if ((val & BMCR_RESET) == 0)
812 break; 812 break;
@@ -979,7 +979,7 @@ static void cas_phy_init(struct cas *cp)
979 writel(val, cp->regs + REG_PCS_MII_CTRL); 979 writel(val, cp->regs + REG_PCS_MII_CTRL);
980 980
981 limit = STOP_TRIES; 981 limit = STOP_TRIES;
982 while (limit-- > 0) { 982 while (--limit > 0) {
983 udelay(10); 983 udelay(10);
984 if ((readl(cp->regs + REG_PCS_MII_CTRL) & 984 if ((readl(cp->regs + REG_PCS_MII_CTRL) &
985 PCS_MII_RESET) == 0) 985 PCS_MII_RESET) == 0)
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
index 61843fd57525..78f8cee5fd74 100644
--- a/drivers/net/sungem_phy.c
+++ b/drivers/net/sungem_phy.c
@@ -79,7 +79,7 @@ static int reset_one_mii_phy(struct mii_phy* phy, int phy_id)
79 79
80 udelay(100); 80 udelay(100);
81 81
82 while (limit--) { 82 while (--limit) {
83 val = __phy_read(phy, phy_id, MII_BMCR); 83 val = __phy_read(phy, phy_id, MII_BMCR);
84 if ((val & BMCR_RESET) == 0) 84 if ((val & BMCR_RESET) == 0)
85 break; 85 break;