Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13980418pxu; Mon, 4 Jan 2021 09:33:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxf3TI6kkvHi45aahGUMhlYaTWZ3RhWJF371dIlyjZrZTGdIK9/d5+XZR15vmAf+B6D5apW X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr43163199edb.259.1609781601435; Mon, 04 Jan 2021 09:33:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609781601; cv=none; d=google.com; s=arc-20160816; b=tj24C4nYc4hn0p5h2VtuUV+rRXuIvQ4h6xiATkEGLo6cvXcgjlTByNF5+gg752uMu9 9Q3/HMWWjyGBXl16N1z4eriHgUm4T6K6MAjVNYOK+YPbEDWTVYXTSzvcEeOOAz0HkF6h ndAwgpfqLRi2Eajzd7fk33bh3j2UtJnCBfa1Uo4tck8S1FJ3+T9mqNJxLJU6bZlnwZQY 1rB8vE2lmhqIAcFWbEPC9mC33MALNiW2ZYIGYBe+ELU0O1/j2F/Vrf/lVumHpa8VAgFM 011Z6eqwI4Vmw2ZWCMCZNR5gR+RdpDOrVrm6DTKDEjuyhvfJLfl3ffmqiimAZkYabEw8 WoYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=D/7fFK2QJLH16NaF3UpEamHpCsiSmNIpqQU70NCZdbU=; b=ZAkB62DH+6zCrMDXuCBl2Fg1rDFnPMOqn4vZrIACcF3NxUEXvFHthDE0fxNXlXEs5M KiEPeF+kujqe8hlU/4krtNb/3R4rkc97JyAm7PzgfFpFKx6a1sQpJTEEl98fFZKRE3nm uLZ9Sms4Pq2yNRgwgd0bjg4MLPxSpwOenIo2TNKknYHHZd9Sal60TQ1xuAK2KIS/BoX9 wu85rFlKbBOBoCZWlevYH0l4mWZXDaSKhABts//jZrG+DIke0YKT/xQJZMZVPmMRnw9d XYAmW2ppwINe7QRvnySW3WBUSxaHtycvIc3MZ4IUdC5TMT0jts2XgKtVwPfYW9YGDwW+ 1IUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t19si29520950eji.402.2021.01.04.09.32.55; Mon, 04 Jan 2021 09:33:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbhADRbx (ORCPT + 99 others); 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