netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] r6040: fix wrong logic in mdio code
@ 2008-12-19  9:56 Florian Fainelli
  2008-12-23  3:42 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2008-12-19  9:56 UTC (permalink / raw)
  To: David Miller, netdev, Joe Chou, Jeff Garzik

Hello David, Jeff,

Those patches should be applied to -stable as well.
--
From: Florian Fainelli <florian@openwrt.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@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.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;
 	}
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 1/3] r6040: fix wrong logic in mdio code
@ 2008-12-19 10:02 Florian Fainelli
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2008-12-19 10:02 UTC (permalink / raw)
  To: David Miller, Joe Chou, Jeff Garzik, netdev

Hello David, Jeff,

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

From: Florian Fainelli <florian@openwrt.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@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.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;
 	}
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] r6040: fix wrong logic in mdio code
  2008-12-19  9:56 Florian Fainelli
@ 2008-12-23  3:42 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-12-23  3:42 UTC (permalink / raw)
  To: florian; +Cc: netdev, Joe.Chou, jeff

From: Florian Fainelli <florian@openwrt.org>
Date: Fri, 19 Dec 2008 10:56:20 +0100

> Those patches should be applied to -stable as well.

I've applied all 3 patches to net-next-2.6 and will
queue them up for -stable as well, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-23  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19 10:02 [PATCH 1/3] r6040: fix wrong logic in mdio code Florian Fainelli
  -- strict thread matches above, loose matches on Subject: below --
2008-12-19  9:56 Florian Fainelli
2008-12-23  3:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).