lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812191056.21176.florian@openwrt.org>
Date:	Fri, 19 Dec 2008 10:56:20 +0100
From:	Florian Fainelli <florian@...nwrt.org>
To:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	Joe Chou <Joe.Chou@....com.tw>, Jeff Garzik <jeff@...zik.org>
Subject: [PATCH 1/3] r6040: fix wrong logic in mdio code

Hello David, Jeff,

Those patches should be applied to -stable as well.
--
From: Florian Fainelli <florian@...nwrt.org>
Subject: [PATCH 1/3] r6040: fix wrong logic in mdio code

This patch fixes a reverse logic in the MDIO code.

Signed-off-by: Joe Chou <Joe.Chou@....com.tw>
Signed-off-by: Florian Fainelli <florian@...nwrt.org>
---
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 34fe7ef..c2e8ac1 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -214,7 +214,7 @@ static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg)
 	/* Wait for the read bit to be cleared */
 	while (limit--) {
 		cmd = ioread16(ioaddr + MMDIO);
-		if (cmd & MDIO_READ)
+		if (!(cmd & MDIO_READ))
 			break;
 	}
 
@@ -233,7 +233,7 @@ static void r6040_phy_write(void __iomem *ioaddr, int phy_addr, int reg, u16 val
 	/* Wait for the write bit to be cleared */
 	while (limit--) {
 		cmd = ioread16(ioaddr + MMDIO);
-		if (cmd & MDIO_WRITE)
+		if (!(cmd & MDIO_WRITE))
 			break;
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ