Skip to contentSkip to conversation

logical/bitand typo in function reset_phy() (inactive), drivers/net/arm/at91_ether.c

PATCH RESEND Applied Roel Kluin 2 participants 2 messages Jan 29, 2008 – Jan 30, 2008

Subsystems (3)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH RESEND 1/1 logical/bitand typo in function reset_phy() (inactive), drivers/net/arm/at91_ether.c

include/linux/mii.h:48:#define BMCR_RESET 0x8000

The function reset_phy() is in "#if 0" inactivated code --
Replace logical "&&" by bit "&" before BMCR_RESET

---

drivers/net/arm/at91_ether.c +1 -1
index 25b114a..0ae0d83 100644
@@ -384,7 +384,7 @@ static void reset_phy(struct net_device *dev)
 	/* Wait until PHY reset is complete */
 	do {
 		read_phy(lp->phy_address, MII_BMCR, &bmcr);
-	} while (!(bmcr && BMCR_RESET));
+	} while (!(bmcr & BMCR_RESET));
 
 	disable_mdi();
 	spin_unlock_irq(&lp->lock);
Applied
#1 lore raw
Quoted 13 lines · Roel Kluin

include/linux/mii.h:48:#define BMCR_RESET 0x8000

The function reset_phy() is in "#if 0" inactivated code --
Replace logical "&&" by bit "&" before BMCR_RESET

---

drivers/net/arm/at91_ether.c +0 -0
index 25b114a..0ae0d83 100644

drivers/net/arm/at91_ether.c static void reset_phy(struct net_device *dev) · line 390

Quoted 8 lines
drivers/net/arm/at91_ether.c +1 -1
@@ -384,7 +384,7 @@ static void reset_phy(struct net_device *dev)
 	/* Wait until PHY reset is complete */
 	do {
 		read_phy(lp->phy_address, MII_BMCR, &bmcr);
-	} while (!(bmcr && BMCR_RESET));
+	} while (!(bmcr & BMCR_RESET));
 
 	disable_mdi();
 	spin_unlock_irq(&lp->lock);

applied