Received: by 10.192.165.156 with SMTP id m28csp1022269imm; Thu, 19 Apr 2018 11:25:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+e7N8KE6cPt/WTh0sBamoo/8JSdCr8mh+lw4Vu0ojEzi5hVma9UhZGxk5Ud6+IQeq4j7+b X-Received: by 10.99.96.193 with SMTP id u184mr2564136pgb.122.1524162358666; Thu, 19 Apr 2018 11:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524162358; cv=none; d=google.com; s=arc-20160816; b=ZzIvW8d64L5cfU5qQmP3wuWyGs3fAaHhXed9k0uy5P/Ff41ol86Ohxv8Kd1uE5GkYw 8e0BMK8aooq8n+ajvJoZMvUbXykjRxSsqRcOzMbByX6c6k10f9Q0S/TN1xrH+VmN3uU0 4ydxrtByEF8WHbeYWskZ9BtC/7RisIKV3nUdS4r0M29lGW4fNsTJ2fgC4LQkjjlTe53H 5aCbA2wj6u/Ba9tG6BGFl0oHrHZryciZ8ewjYUkD8TPNOeeMx/+90nOml9zlwaX1xt6Y d6PL867pEMAJB/FWQxRbHrcfWet8YvA5ZosB4lLcTTa9M32ELJ5MvAXPK0JQSXKkS4lU bmbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=YFR4GVMGkerBtDsMD0yqnmUOWc8QIoLw6l8lIrhbtLM=; b=MkZJftb5OdBtNAdwmUuCO1WY9mHeqqFEBR6RRgNE6xupC04cSbzLJ15tg9/PbPjj4b fdzFIeqY4FzDksk6RInt8AL+qA8VsdDevdKD7iUYqVRlJR6ukQQFtUi6nS5yJeYrcsOu ScL3Rn45ro0+u6WG/YuGBtMuSatryQKXJ9bU4KSsITaczULxEhfohK4RU/jol30kIjKC o9SbPhoHtbxQ1W+DyLywCldKGHGyL0PWGiPaqRVpYptLxd/VMyxYu/Vpa8QNd8rr9FPd l0MPbsAvAntmpDqXI1FYcFgVFnrY/hihBJ3SJXFzXrZYcOn5NvLOc5FE2+DUwhBIMf5N XSrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ez3EkObN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si3593177pfd.267.2018.04.19.11.25.41; Thu, 19 Apr 2018 11:25:58 -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=pass header.i=@linaro.org header.s=google header.b=ez3EkObN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbeDSSY2 (ORCPT + 99 others); Thu, 19 Apr 2018 14:24:28 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36712 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbeDSSY0 (ORCPT ); Thu, 19 Apr 2018 14:24:26 -0400 Received: by mail-lf0-f67.google.com with SMTP id d20-v6so1553454lfe.3 for ; Thu, 19 Apr 2018 11:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YFR4GVMGkerBtDsMD0yqnmUOWc8QIoLw6l8lIrhbtLM=; b=ez3EkObNxt38HySpomeeTqRAXdFCXo9p91mIwou+REw4MZydniRPD8yEkog3M93j9p 0v4yyhAbM6dsO8HVWgJHi45kiAJRulreQOhfNHET85fwy5cvcJywV48CxlG5XkwhWiEs i7pNqEFgoCVa519a5vtXURxG7yWi4cHR7et3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YFR4GVMGkerBtDsMD0yqnmUOWc8QIoLw6l8lIrhbtLM=; b=MgHLsD86tSTRrPpp4PaD8zzp+ZNw0RIp8BNF0VxLKbVvV5zGeF5pU+dRPwtc3BtFSt NOsb+UuVi6yznAeKz8vQ8XhK5n9VURAFfFNYlEoUnwocCgibml2gOUx9VqOF+QUnJPwx BhIlI4CNBhH8Bu7sbDmkWRwNz1odnrr17AhX87vSd8+NSI4PLctRRUcasiRn5FYWSK0R r0gwoAVgH1lEcxWXxBdRhgD8UeV2SzRhhnIxpv705aEJZQuEqQvQY6efnFlnRaAQqgJP wdrgGT8Oy4V10nQEqLRIUu32fbIJe4pfj2x3SF7n1qolU7vG28YCQuPtPsPVuXoTQs03 DWNg== X-Gm-Message-State: ALQs6tDRwjAP4fUHCzG1+prjJvmlb6qEHd2llkvdB+f9sDG7f76+PgTB BCmVKipYHv+BjbtDKzjoLhl84QPdRjY3a5xTQtDzQg== X-Received: by 10.46.135.134 with SMTP id n6mr5215376lji.52.1524162265247; Thu, 19 Apr 2018 11:24:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:5619:0:0:0:0:0 with HTTP; Thu, 19 Apr 2018 11:24:24 -0700 (PDT) In-Reply-To: <1524154267.17017.15.camel@nxp.com> References: <20180411183622.305902791@linuxfoundation.org> <20180411183630.390575424@linuxfoundation.org> <1524154267.17017.15.camel@nxp.com> From: Naresh Kamboju Date: Thu, 19 Apr 2018 23:54:24 +0530 Message-ID: Subject: Re: [PATCH 4.9 181/310] net: phy: micrel: Restore led_mode and clk_sel on resume To: Leonard Crestez Cc: Grygorii Strashko , Andrew Lunn , open list , linux- stable , Florian Fainelli , "David S. Miller" , Sasha Levin , Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19 April 2018 at 21:41, Leonard Crestez wrote: > On Thu, 2018-04-19 at 17:02 +0530, Naresh Kamboju wrote: >> On 12 April 2018 at 00:05, Greg Kroah-Hartman >> wrote: >> > >> > 4.9-stable review patch. If anyone has any objections, please let me know. >> > >> > ------------------ >> > >> > From: Leonard Crestez >> > >> > [ Upstream commit 79e498a9c7da0737829ff864aae44df434105676 ] >> > >> > These bits seem to be lost after a suspend/resume cycle so just set them >> > again. Do this by splitting the handling of these bits into a function >> > that is also called on resume. >> > >> > This patch fixes ethernet suspend/resume on imx6ul-14x14-evk boards. >> > >> > Signed-off-by: Leonard Crestez >> > Reviewed-by: Florian Fainelli >> > Signed-off-by: David S. Miller >> > Signed-off-by: Sasha Levin >> > Signed-off-by: Greg Kroah-Hartman >> > --- >> > drivers/net/phy/micrel.c | 42 ++++++++++++++++++++++++++++-------------- >> > 1 file changed, 28 insertions(+), 14 deletions(-) > >> arm32 x15 device booting 4.9 kernel shows kernel warning and >> the network is not working on the device. >> >> Linux version 4.9.95-rc1 (buildslave@lkft-01) (gcc version 6.2.1 20161016 >> (Linaro GCC 6.2-2016.11) ) #1 SMP Tue Apr 17 19:12:22 UTC 2018 >> >> Boot log kernel crash log: >> -------------------------- >> [ 13.766589] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready >> [ 13.805441] net eth0: initializing cpsw version 1.15 (0) >> [ 13.930334] Unable to handle kernel NULL pointer dereference at >> virtual address 00000008 >> [ 13.982009] PC is at kszphy_config_reset+0x1c/0x150 >> [ 13.986909] LR is at kszphy_resume+0x24/0x64 >> LAVA job id: https://lkft.validation.linaro.org/scheduler/job/187429#L3341 > > Looking at this dump I'm guessing that phydev->priv is NULL at the > start of kszphy_config_reset and this really shouldn't be happening. > > The phydev->priv field is initialized by kszphy_probe but your > particular phy (KSZ9031) in linux-4.9.y does not seem to have .probe = > kszphy_probe assigned in the struct phy_driver ksphy_driver array. > > In upstream this was added by commit bfe72442578b ("net: phy: micrel: > fix crash when statistic requested for KSZ9031 phy"). The message for > that patch claims to fix a kernel crash on this command: > > ethtool --phy-statistics eth0 > > Looking at the code this issue should affect linux-4.9.y on your board. > Naresh: can you please check? After reverting the patch i have run this command and kernel oops showed up. ethtool --phy-statistics eth0 PC is at kszphy_get_stats+0x74/0xa8 ethtool --phy-statistics eth0 crashed on x15 https://pastebin.com/8cGBMuxC - Naresh