netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] micrel: fix masking off LED bits
@ 2014-03-18 23:58 Sergei Shtylyov
  2014-03-18 23:27 ` Laurent Pinchart
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2014-03-18 23:58 UTC (permalink / raw)
  To: netdev; +Cc: linux-sh, ben.dooks

Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
obvious mistake when masking off  the LED mode bits: forgot to do a logical NOT
to the mask with which it ANDs the register value, so that unrelated bits are
cleared instead.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against DaveM's 'net-next.git' repo.

 drivers/net/phy/micrel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: net-next/drivers/net/phy/micrel.c
===================================================================
--- net-next.orig/drivers/net/phy/micrel.c
+++ net-next/drivers/net/phy/micrel.c
@@ -167,7 +167,7 @@ static int kszphy_setup_led(struct phy_d
 	if (temp < 0)
 		return temp;
 
-	temp &= 3 << shift;
+	temp &= ~(3 << shift);
 	temp |= val << shift;
 	rc = phy_write(phydev, reg, temp);
 

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

end of thread, other threads:[~2014-03-20 17:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 23:58 [PATCH] micrel: fix masking off LED bits Sergei Shtylyov
2014-03-18 23:27 ` Laurent Pinchart
2014-03-19  8:12 ` Ben Dooks
2014-03-19 16:21   ` Florian Fainelli
2014-03-19 19:35     ` Sergei Shtylyov
2014-03-19 21:42 ` David Miller
2014-03-20 18:44   ` Sergei Shtylyov

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).