Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1182144imm; Wed, 11 Jul 2018 19:30:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfttlBlcOiKMR1+hDfGIFXSFUUe6nQcEbkilD0y7bdxEwcAkmyuyI63FXc2kbI836Zovpr4 X-Received: by 2002:a62:3b89:: with SMTP id w9-v6mr426633pfj.80.1531362608175; Wed, 11 Jul 2018 19:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531362608; cv=none; d=google.com; s=arc-20160816; b=J2Cm2BsHYVvu+U/6AiqATfg0buNd247wiCtUwaT38I+Dgp5/AK6LTp61d4umN09652 B7lV23Il7Iu0Vpb7pNulcPpsIWo6ntHlDBHgVN+hXbRkAoFbIGewXWQWJ+MeYr6g6uSJ uZCFmtLzqKY310hvhVV83br/JvqRu2w6gUeKnGdILVNegxfFTQs/hP+yUZQMuyQYCAwY F2f8a2+1b/itCJjSA9riJPe0g/6ztPO9n66AQ2S37TAyvQbwSL+TYJZsdGtjkU51NKid ipW+y9Ewe5AC9GTFjZBjfXpdBIVAQbFsC1NpiQJ3sfUKwENOtFiUzsDwVk02BtGq+t27 HAnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=otuIXIMsT8Ws7CaWZFCoF+N95OKBQHAukL2ZnO1BnYY=; b=gq9XrNYrVs9Q20gM9wpnf9oJDu6VFpzt0NijGdd7IbI1VmD73sJqMbjuI/dpFDzXCR +I7G1sa9iuKY5QcCrRaM82DSIW9i+0HjxWVJvC2dMibdhUsvAaGZmkFx1bMQnQvo8lhs zkkXHSStOyFdnshJd+daqQJQ/lG/g2gos0DkvUJ6oYHcnDyjto2PQSVxCx4Qv9ckfljW I5xCVqnxReZOGG8kiq9QDtaClVb/dOJrWxfQEnrpVD0cbBf/9XEXETw8f67bvnf/PMw0 Cbd8EOTgwYubvANMZ2KeWc8oMR3mCVdTCzGmcfaXfjv64nKuDSrtL32veZTDZh6SgQzD 88Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aoE7ngQN; 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 g16-v6si1489338pgk.465.2018.07.11.19.29.40; Wed, 11 Jul 2018 19:30:08 -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=aoE7ngQN; 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 S2390195AbeGKUVu (ORCPT + 99 others); Wed, 11 Jul 2018 16:21:50 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:47095 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390100AbeGKUVt (ORCPT ); Wed, 11 Jul 2018 16:21:49 -0400 Received: by mail-oi0-f66.google.com with SMTP id y207-v6so51601946oie.13 for ; Wed, 11 Jul 2018 13:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=otuIXIMsT8Ws7CaWZFCoF+N95OKBQHAukL2ZnO1BnYY=; b=aoE7ngQN3iH4NTZyzCIYJ2QqpW6p6VsT5AHsj8NtjGdC36fcc68ThvPhLOf6xvxKhu ht40Q+k1uTM2KZ9/E7Dvzg7M5DBP3MlQsMtDYSEqPpBj1LFMbeaPvKIKpdJ/KnqOkZn3 TSsTHFZG1PIKmdzbOMnNHkSYKT6dll6MGAWKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=otuIXIMsT8Ws7CaWZFCoF+N95OKBQHAukL2ZnO1BnYY=; b=N0bkfdLZc5gv2dDPYU3n60Ryf1Ivpep8IvIlufsnWJqIZBe7WS771KM1eoVq6IxZWr sDpxXzNSGCcAlglAmfF1Shx6MqaJ2DGXt25Y70wGbRi12jw5NtpcrcVElrONs29dUNAn C7aGsDreTkc2TOYdzQ7/Hg+eyfnXx67hbsT9GoYrUv5B5UVEKjhAyU7gA6hP75rqFhE1 YCRmNQDk/rEEknml4PW/hQENL8PpU8qELpOlwpGWlcmYi2bqI1u8fM2zNuuAneOCJtCo EFp2MPH9p14S3sztct6ZGHqrAp0msrZVqAIaVBExeubOi8VUFe4XxmRa6v5+e/z1+cMH P/kQ== X-Gm-Message-State: AOUpUlH6lRyXwxw9eOBCD2hFyZkC/V74pywGeZZu0ejbnINFdnywVjod /2dRFOSBqMojU5bDDJgXJvM+eA== X-Received: by 2002:aca:3a03:: with SMTP id h3-v6mr127432oia.270.1531340150211; Wed, 11 Jul 2018 13:15:50 -0700 (PDT) Received: from localhost ([2600:3c00::f03c:91ff:fefc:c793]) by smtp.gmail.com with ESMTPSA id y85-v6sm12195889oie.25.2018.07.11.13.15.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 13:15:49 -0700 (PDT) Date: Wed, 11 Jul 2018 20:15:48 +0000 From: Dan Rue To: Leonard Crestez Cc: Florian Fainelli , Andrew Lunn , Grygorii Strashko , open list , linux- stable , "David S. Miller" , Sasha Levin , Greg Kroah-Hartman , Naresh Kamboju , chris.ruehl@gtsys.com.hk, Lars Persson Subject: Re: [PATCH 4.9 181/310] net: phy: micrel: Restore led_mode and clk_sel on resume Message-ID: <20180711201548.3rvad25yhcnr5h4e@linode.therub.org> References: <20180411183622.305902791@linuxfoundation.org> <20180411183630.390575424@linuxfoundation.org> <1524154267.17017.15.camel@nxp.com> <223ffd4d-567e-6c5c-9581-5304494dd0b3@gmail.com> <1524164724.17017.35.camel@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1524164724.17017.35.camel@nxp.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 19, 2018 at 10:05:24PM +0300, Leonard Crestez wrote: > On Thu, 2018-04-19 at 11:32 -0700, Florian Fainelli wrote: > > +Others who reported the same problem > > On 04/19/2018 11:24 AM, Naresh Kamboju wrote: > > > On 19 April 2018 at 21:41, Leonard Crestez wrote: > > > > > > > > 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 > > >? > > Chris proposed the following patch, which has not been formally > > submitted yet: > > > > Meanwhile, Greg seems to have reverted the offending patch, so we should > > be good with 4.9.95. > > I don't object to reverting my patch from linux-4.14.y but it seems all > the affected hardware would also be affected by the crash from?ethtool > --phy-statistics eth0. Adding?bfe72442578b to stable would be great > because it fixes more than the patch in the title. > > In the other thread there is a mention that "Micrel KSZ8795", > "Micrel KSZ886X Switch", "Micrel KSZ8061", and "Micrel KS8737" might > still have problems after?bfe72442578b. Is this because they have > kszphy_config_init but not kszphy_probe? All versions of > kszphy_config_init seem to check for a NULL priv. To conclude this thread, bfe72442578b has been backported as of 4.9.112 and 'ethtool --phy-statistics eth0' no longer causes a NULL pointer error. Dan > > -- > Regards, > Leonard