From patchwork Wed Jun 25 07:24:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Shen X-Patchwork-Id: 4416621 Return-Path: X-Original-To: patchwork-linux-arm@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 CB671BEEAA for ; Wed, 25 Jun 2014 07:27:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A7232034B for ; Wed, 25 Jun 2014 07:27:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DC0920304 for ; Wed, 25 Jun 2014 07:27:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzhZr-0005Iy-Bx; Wed, 25 Jun 2014 07:25:07 +0000 Received: from nasmtp01.atmel.com ([192.199.1.246] helo=DVREDG02.corp.atmel.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzhZn-0004PD-MB for linux-arm-kernel@lists.infradead.org; Wed, 25 Jun 2014 07:25:04 +0000 Received: from sjogate2.atmel.com (10.42.103.223) by DVREDG02.corp.atmel.com (10.42.103.31) with Microsoft SMTP Server id 14.2.347.0; Wed, 25 Jun 2014 01:24:38 -0600 Received: from Dev4Android.corp.atmel.com ([10.217.2.46]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id s5P7Gwja017375; Wed, 25 Jun 2014 00:16:58 -0700 (PDT) From: Bo Shen To: Subject: [RFC PATCH] phy: micrel: make phy_has_fixups attribute read correctly Date: Wed, 25 Jun 2014 15:24:34 +0800 Message-ID: <1403681075-16181-1-git-send-email-voice.shen@atmel.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140625_002503_803280_CA629C0B X-CRM114-Status: UNSURE ( 7.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: netdev@vger.kernel.org, Bo Shen , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 If the fixups parameters get from dtb, it won't set has_fixups parameters, so when read phy_has_fixups attribute, it always present as 0. Add this patch to make phy_has_fixups attribute read correctly. Signed-off-by: Bo Shen --- drivers/net/phy/micrel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index bc7c7d2..c384922 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -237,6 +237,8 @@ static int ksz9021_load_values_from_of(struct phy_device *phydev, if (!matches) return 0; + else + phydev->has_fixups = true; if (matches < 4) newval = kszphy_extended_read(phydev, reg); @@ -330,6 +332,8 @@ static int ksz9031_of_load_skew_values(struct phy_device *phydev, if (!matches) return 0; + else + phydev->has_fixups = true; if (matches < numfields) newval = ksz9031_extended_read(phydev, OP_DATA, 2, reg);