From patchwork Tue Mar 18 23:58:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 3856721 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 35C0CBF540 for ; Wed, 19 Mar 2014 17:59:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5483020120 for ; Wed, 19 Mar 2014 17:59:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87A552021A for ; Wed, 19 Mar 2014 17:59:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757574AbaCRW6U (ORCPT ); Tue, 18 Mar 2014 18:58:20 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:38348 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756119AbaCRW6U (ORCPT ); Tue, 18 Mar 2014 18:58:20 -0400 Received: by mail-la0-f46.google.com with SMTP id hr17so5281391lab.19 for ; Tue, 18 Mar 2014 15:58:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:cc:from:organization:date :mime-version:content-type:content-transfer-encoding:message-id; bh=Xausc6XpHfDB6Zq1Q74a2mFLe3aGlxIp08P26Z5mvMQ=; b=kx8gx3YDJvpLcgIw/p4k8FMfXo0/DKR4ixHqK5HUE1alMb34215nSSNF7e4Bfsu8p5 XAwwTA9mBx3aDQs4lk73QvwP8efdrbvDL0KL81RpxKBGDIZbXt6ZHVTntoArIBDrAYqs h0ZM05Zx/XihojVkzBUzzyJEsXUyEZKmvGXlUo5z5eaOW1Umcm5KqzbrisxfgEvtiAJb 9NjiVbVpvjRPTn7PSNzc1VZbxLxbHaIxTyJoBmI1nP9Zh0erZIov039w+dOPCUqx2OQJ euQWdp+k+dS3euU7/XniKoCvLGkMxr+r22r1iKISV1ymI61ayuQPYM46hKUB0hCHaW00 gfZw== X-Gm-Message-State: ALoCoQnTgHPuI+R90d+vw7mBwFhNBOzgZGHU38XvpJ+vGCGGfjY3tH5hh+rKsi91Z8HCd8uRhYPU X-Received: by 10.152.210.70 with SMTP id ms6mr22986221lac.5.1395183498994; Tue, 18 Mar 2014 15:58:18 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp83-237-58-200.pppoe.mtu-net.ru. [83.237.58.200]) by mx.google.com with ESMTPSA id q6sm18152742lal.3.2014.03.18.15.58.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 18 Mar 2014 15:58:18 -0700 (PDT) To: netdev@vger.kernel.org Subject: [PATCH] micrel: fix masking off LED bits Cc: linux-sh@vger.kernel.org, ben.dooks@codethink.co.uk From: Sergei Shtylyov Organization: Cogent Embedded Date: Wed, 19 Mar 2014 02:58:16 +0300 MIME-Version: 1.0 Message-Id: <201403190258.16812.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Laurent Pinchart Acked-by: Ben Dooks Reviewed-by: Florian Fainelli --- This patch is against DaveM's 'net-next.git' repo. drivers/net/phy/micrel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);