Skip to contentSkip to conversation

via-velocity: Fix test of mii_status bit VELOCITY_DUPLEX_FULL

PATCH Applied Roel Kluin 2 participants 2 messages Aug 14, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 via-velocity: Fix test of mii_status bit VELOCITY_DUPLEX_FULL

Test whether VELOCITY_DUPLEX_FULL bit is set in mii_status.

---
// vi drivers/net/via-velocity.h +1448
#define VELOCITY_DUPLEX_FULL 0x00000010UL

drivers/net/via-velocity.c +1 -1
index 3ba3595..cee08a1 100644
@@ -1778,7 +1778,7 @@ static void velocity_error(struct velocity_info *vptr, int status)
 			 *	 mode
 			 */
 			if (vptr->rev_id < REV_ID_VT3216_A0) {
-				if (vptr->mii_status | VELOCITY_DUPLEX_FULL)
+				if (vptr->mii_status & VELOCITY_DUPLEX_FULL)
 					BYTE_REG_BITS_ON(TCR_TB2BDIS, &regs->TCR);
 				else
 					BYTE_REG_BITS_OFF(TCR_TB2BDIS, &regs->TCR);