| From horms@vergenet.net Wed Dec 10 18:29:26 2014 |
| From: Simon Horman <horms+renesas@verge.net.au> |
| Date: Thu, 11 Dec 2014 11:29:12 +0900 |
| Subject: [PATCH ltsi-3.14 2/2] micrel: fix masking off LED bits |
| To: ltsi-dev@lists.linuxfoundation.org |
| Cc: Greg KH <gregkh@linuxfoundation.org>, Magnus Damm <magnus.damm@gmail.com>, yoshihiro shimoda <yoshihiro.shimoda.uh@renesas.com> |
| Message-ID: <1418264952-27886-3-git-send-email-horms+renesas@verge.net.au> |
| |
| |
| From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
| |
| 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> |
| Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| Acked-by: Ben Dooks <ben.dooks@codethink.co.uk> |
| Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| (cherry picked from commit 28bdc499d647124fa5844453d35e6f5d1b3810dc) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/net/phy/micrel.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/net/phy/micrel.c |
| +++ b/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); |
| |