From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vps0.lunn.ch ([185.16.172.187]:35201 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932415AbeCSMjk (ORCPT ); Mon, 19 Mar 2018 08:39:40 -0400 Date: Mon, 19 Mar 2018 13:39:39 +0100 From: Andrew Lunn To: Kevin Hao Cc: netdev@vger.kernel.org, Florian Fainelli , Claudiu Manoil Subject: Re: [PATCH] net: phy: realtek: Add dummy stubs for MMD register access for rtl8211b Message-ID: <20180319123939.GC19795@lunn.ch> References: <20180319120547.18707-1-haokexin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180319120547.18707-1-haokexin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Mar 19, 2018 at 08:05:47PM +0800, Kevin Hao wrote: > The Ethernet on mpc8315erdb is broken since commit b6b5e8a69118 > ("gianfar: Disable EEE autoneg by default"). The reason is that > even though the rtl8211b doesn't support the MMD extended registers > access, it does return some random values if we trying to access > the MMD register via indirect method. This makes it seem that the > EEE is supported by this phy device. And the subsequent writing to > the MMD registers does cause the phy malfunction. So add dummy stubs > for the MMD register access to fix this issue. Hi Kevin The Micrel PHY has the same problem. Please add generic genphy_read_mmd_unsupported() and genphy_write_mmd_unsupported() to phy_device.c, and use them from both the Micrel and Realtek PHY drivers. Also, a return value of -EOPNOTSUPP is more appropriate. Thanks Andrew