From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f196.google.com ([209.85.161.196]:38986 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751776AbeCTBnt (ORCPT ); Mon, 19 Mar 2018 21:43:49 -0400 Received: by mail-yw0-f196.google.com with SMTP id l24so11200ywk.6 for ; Mon, 19 Mar 2018 18:43:49 -0700 (PDT) From: Kevin Hao To: netdev@vger.kernel.org Cc: Andrew Lunn , Florian Fainelli , Claudiu Manoil , Kevin Hao Subject: [PATCH v2 2/3] net: phy: realtek: Use the dummy stubs for MMD register access for rtl8211b Date: Tue, 20 Mar 2018 09:44:53 +0800 Message-Id: <20180320014454.12697-3-haokexin@gmail.com> In-Reply-To: <20180320014454.12697-1-haokexin@gmail.com> References: <20180320014454.12697-1-haokexin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 use the dummy stubs for the MMD register access to fix this issue. Fixes: b6b5e8a69118 ("gianfar: Disable EEE autoneg by default") Signed-off-by: Kevin Hao --- drivers/net/phy/realtek.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index ee3ca4a2f12b..9f48ecf9c627 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -172,6 +172,8 @@ static struct phy_driver realtek_drvs[] = { .flags = PHY_HAS_INTERRUPT, .ack_interrupt = &rtl821x_ack_interrupt, .config_intr = &rtl8211b_config_intr, + .read_mmd = &genphy_read_mmd_unsupported, + .write_mmd = &genphy_write_mmd_unsupported, }, { .phy_id = 0x001cc914, .name = "RTL8211DN Gigabit Ethernet", -- 2.9.3