From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB497C433DB for ; Mon, 4 Jan 2021 17:31:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB9EA224DF for ; Mon, 4 Jan 2021 17:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbhADRbx (ORCPT ); Mon, 4 Jan 2021 12:31:53 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:48892 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbhADRbw (ORCPT ); Mon, 4 Jan 2021 12:31:52 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kwThB-00FzuS-9r; Mon, 04 Jan 2021 18:31:05 +0100 Date: Mon, 4 Jan 2021 18:31:05 +0100 From: Andrew Lunn To: Ioana Ciornei Cc: Geert Uytterhoeven , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , Russell King , Wolfram Sang , "netdev@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] [RFC] net: phy: Fix reboot crash if CONFIG_IP_PNP is not set Message-ID: References: <20210104122415.1263541-1-geert+renesas@glider.be> <20210104145331.tlwjwbzey5i4vgvp@skbuf> <20210104170112.hn6t3kojhifyuaf6@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > The basic rules here should be, if the MDIO bus is registered, it is > usable. There are things like PHY statistics, HWMON temperature > sensors, etc, DSA switches, all which have a life cycle separate to > the interface being up. [Goes and looks at the code] Yes, this is runtime PM which is broken. sh_mdio_init() needs to wrap the mdp->mii_bus->read and mdp->mii_bus->write calls with calls to pm_runtime_get_sync(&mdp->pdev->dev); and pm_runtime_put_sync(&mdp->pdev->dev); The KSZ8041RNLI supports statistics, which ethtool --phy-stats can read, and these will also going to cause problems. Andrew