From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH 1/3] net: phy: Check phy_driver ready before accessing Date: Thu, 7 Jun 2018 20:12:30 +0200 Message-ID: <20180607181230.GF25513@lunn.ch> References: <20180607155348.149665-1-brandon.maier@rockwellcollins.com> <20180607165227.GD25513@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, f.fainelli@gmail.com, davem@davemloft.net, michal.simek@xilinx.com, Clayton Shotwell , Kristopher Cory , linux-kernel@vger.kernel.org To: Brandon Maier Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > Agreed. Another thing that looks suspicious to me is the driver > overrides the private data of the device it's attaching too, in the > `priv->phy_dev->priv = priv` bit. Seems like that could cause all > sorts of driver corruption problems. Ah, yes. That is very broken. Many PHYs will just explode sometime later, since they use phdev->priv. > But fixing that is going to require more drastic changes to how this > driver works. So it'd be worth applying this patch in the mean time. Patches welcome. Andrew