From: Heiner Kallweit Subject: Re: [PATCH RFC 09/18] r8168: use genphy_soft_reset instead of open coding the soft reset Date: Fri, 22 Dec 2017 23:19:37 +0100 Message-ID: <00ed2882-6560-0b42-1b95-209cdeb2fd71@gmail.com> References: <83321b2e-8402-26c5-9703-3fe795cc893d@gmail.com> <13598591-49fe-0020-443e-9d6cedb53cfb@gmail.com> <20171222095706.GF2431@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Realtek linux nic maintainers , Chun-Hao Lin , David Miller , "netdev@vger.kernel.org" To: Andrew Lunn Return-path: Received: from mail-wr0-f177.google.com ([209.85.128.177]:40641 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755458AbdLVWTr (ORCPT ); Fri, 22 Dec 2017 17:19:47 -0500 Received: by mail-wr0-f177.google.com with SMTP id p17so5288692wre.7 for ; Fri, 22 Dec 2017 14:19:47 -0800 (PST) In-Reply-To: <20171222095706.GF2431@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: Am 22.12.2017 um 10:57 schrieb Andrew Lunn: > On Thu, Dec 21, 2017 at 09:50:28PM +0100, Heiner Kallweit wrote: >> Use genphy_soft_reset instead of open coding the soft reset. > > Hi Heiner > > At this point, you have swapped over the phylib. Does one of the > drivers in drivers/net/phy now take control of the PHY? Does the PHY > ID match one of those in realtek.c? > > The PHY driver and phylib should be responsible for resetting the > PHY. The MAC driver should not need to do this. > In my case the PHY ID matches the existing RTL8211E driver in realtek.c and the MAC driver wouldn't have to do any soft reset. However there may be chips with a PHY ID not yet being supported by realtek.c. AFAICS in such a case phylib uses genphy_driver which has a no-op soft reset. Therefore I'd tend to say that we can remove the phy soft reset from MAC driver only after being sure that all PHY ID's of supported NIC's have a driver in realtek.c. > Andrew > Heiner By the way: Thanks for the review comments.