Received: by 10.213.65.68 with SMTP id h4csp1835372imn; Thu, 5 Apr 2018 04:45:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+dwyoekA49Wzv1ww5yu/kgPepbeImwE7KNF0cXFjxbGG0WH3Qlfx8chKjN7JTwH2wEGHFE X-Received: by 2002:a17:902:362:: with SMTP id 89-v6mr22303083pld.270.1522928751776; Thu, 05 Apr 2018 04:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522928751; cv=none; d=google.com; s=arc-20160816; b=QNnMP6QMCEi5wtnJtriiThd1l8YBbA4cEJYHKRLb6NIiRdd6JnkbWz4pAcQSYiQdIO b25BbccfxyRG67kjLoDpfuEGToYLapWyYo2poXXZiwtSJB0XokrEeaVf65eGc3+1XwVf iiN/KxG4nF+P5Vsm60PGG9bXwRsd4aBKhu6RcB9Qj38sKDr8Bde2jraOoYTsqAJ6IZwJ 9wYzvl3iJXuQ+jqS3AmwFWAeU9m+032D1/ZIlFplwe5IfEfFLI+oufi79b/zYhtdGNb6 W30UOriMTX+37MK8jW6AceVVhH4nHCfGNXKYlGYqayDWeXEu4m0xk/KRZMsr3R7AvgUx gjoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dhlZgGBsD93OKhXV6UDRrQAyv5d5Jkiyjq7im+rS7LM=; b=bJX64FYShrMOd45wivvmyqso5/jmTNV2Q4kYkS8CstakppoZ2hh08B4ChPyDCwoNYt iKAhqILa30yGTqeZCF2PKMfjKILan9CJsy4CpjGdZHOz6KJDdllzeIf8FmvkZs+NT7j3 rFmGh6zZUm2xbrHtM0V9eyXRNhg/iIXJpuYQCAei/ndYIdm17c5lhSx24ikHlHoSh1Zc uNoJT4ELRpJywrnYDdOEZ9+/T8WywUjWAoo/6tg2yeDW4G8tSsuih2zk1k3mgVj2fOXH 8dqY3/fD8/mnQXqTmY2ADDlG1ucKqj1OZXqeYPS6F36Z/+zcJs/B5gdu4Puy+OLc4F0w 4B6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BnGGbOU4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si5862277pll.667.2018.04.05.04.45.37; Thu, 05 Apr 2018 04:45:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=BnGGbOU4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbeDELoc (ORCPT + 99 others); Thu, 5 Apr 2018 07:44:32 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:51203 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbeDELo3 (ORCPT ); Thu, 5 Apr 2018 07:44:29 -0400 Received: by mail-wm0-f66.google.com with SMTP id u189so4875586wmd.1; Thu, 05 Apr 2018 04:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dhlZgGBsD93OKhXV6UDRrQAyv5d5Jkiyjq7im+rS7LM=; b=BnGGbOU44x/pjt3MW9JcjoT7GIUiClK3D+knSA+8spD79jPYoxiHjWHgf7sFLXgn61 jrVy7HfRoFoe1ABhG7ZgNFFyOCkvoMWD852fmhKU5tm/AlkKYpGT9TWQeMr/hHYbtNel DEtVPZcvie4JH6zFqYU30AlbyJbUpeDGIqxYdonMKEWMk9Nv6bHG2ts5eP3StTElrTtu 9n14Tp43bY2DNbww2PzvgChwSc4CybninIucKwer8yBsIe76OT/x3R9XK5RWxO40pObp A8NrIGE2fU95f9ljLmNxZU1IWmdN64VOc+iQkmX7031JKKbEBmE37LsMKmc6aQvOTjUd xNUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=dhlZgGBsD93OKhXV6UDRrQAyv5d5Jkiyjq7im+rS7LM=; b=T7I5x56zANAOtXyaoewihf9dVZPUkeJ7ku0awaNjwfcn6qkHLoadFn3wdDHRK/vIX7 YIjNXu3IvxG6/wGQnIl5FoL0d/XnUt0NL7dD3LXaVW8awqzGn2ZE0BijJcsUhbL6aoUZ YfEfh+gL/azkwqZ4U747z2+7w/OfNtEVCwKIahXHfIr3bFxvFTNOyj8M48G99QH/Rcr7 FOn/LY0C80hxrIDHd4aAj1DfyfgZv+2YdWGv1xx4Eh9W1xvjaGxWgLAj8QM2VOwJYrGj wReSSXdo6Gr/CZgOQizm2u+0i3gF+AjVDijlWFu7jPEXZGX/BbU1RzKpa7f5dKassKx0 px3w== X-Gm-Message-State: ALQs6tACEngIM5GXz53qiRUuwzvAKBhVxcrs4nhXNs9QYhotsHpQzwbR K72lHxRuDMxcUABn8OAhpDg= X-Received: by 10.46.153.147 with SMTP id w19mr13865526lji.93.1522928668302; Thu, 05 Apr 2018 04:44:28 -0700 (PDT) Received: from localhost (87-57-30-174-static.dk.customer.tdc.net. [87.57.30.174]) by smtp.gmail.com with ESMTPSA id g22sm1275013lje.36.2018.04.05.04.44.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Apr 2018 04:44:27 -0700 (PDT) From: esben.haabendal@gmail.com To: Richard Cochran , Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org (open list:PTP HARDWARE CLOCK SUPPORT), linux-kernel@vger.kernel.org (open list) Cc: Esben Haabendal , Rasmus Villemoes Subject: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings Date: Thu, 5 Apr 2018 13:44:24 +0200 Message-Id: <20180405114424.8519-2-esben.haabendal@gmail.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405114424.8519-1-esben.haabendal@gmail.com> References: <20180405114424.8519-1-esben.haabendal@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Esben Haabendal Read configration settings, to allow automatic forced speed/duplex setup by hardware strapping. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes --- drivers/net/phy/dp83640.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 654f42d00092..01e21b4998ad 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -1134,6 +1134,10 @@ static int dp83640_probe(struct phy_device *phydev) if (!dp83640) goto no_memory; + err = genphy_read_config(phydev); + if (err) + goto no_config; + dp83640->phydev = phydev; INIT_DELAYED_WORK(&dp83640->ts_work, rx_timestamp_work); @@ -1166,6 +1170,7 @@ static int dp83640_probe(struct phy_device *phydev) no_register: clock->chosen = NULL; +no_config: kfree(dp83640); no_memory: dp83640_clock_put(clock); -- 2.16.3