From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH RFC 12/18] r8168: switch to phy_mii_ioctl Date: Fri, 22 Dec 2017 11:00:42 +0100 Message-ID: <20171222100042.GI2431@lunn.ch> References: <83321b2e-8402-26c5-9703-3fe795cc893d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Realtek linux nic maintainers , Chun-Hao Lin , David Miller , "netdev@vger.kernel.org" To: Heiner Kallweit Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:43013 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932066AbdLVKAq (ORCPT ); Fri, 22 Dec 2017 05:00:46 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: > static int rtl8168_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) > { > - struct rtl8168_private *tp = netdev_priv(dev); > - struct mii_ioctl_data *data = if_mii(ifr); > + if (!netif_running(dev)) > + return -ENODEV; It is sometimes useful to be able to prod and poke the PHY when the MAC is not running. Is this limit because of power saving? Otherwise, this patch looks good. Thanks Andrew