From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D192BC282D8 for ; Fri, 1 Feb 2019 08:10:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC8AA21872 for ; Fri, 1 Feb 2019 08:10:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728272AbfBAIK7 (ORCPT ); Fri, 1 Feb 2019 03:10:59 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:38028 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726110AbfBAIK6 (ORCPT ); Fri, 1 Feb 2019 03:10:58 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8749D9FAC809A93A310D; Fri, 1 Feb 2019 16:10:56 +0800 (CST) Received: from [127.0.0.1] (10.57.37.248) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Fri, 1 Feb 2019 16:10:55 +0800 Subject: Re: [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x" To: Russell King , Andrew Lunn , Florian Fainelli , Heiner Kallweit CC: "David S. Miller" , References: From: liuyonglong Message-ID: <140c2f05-ab62-ebe4-0bb6-35c620714f19@huawei.com> Date: Fri, 1 Feb 2019 16:10:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.37.248] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/2/1 0:59, Russell King wrote: > This reverts commit 6623c0fba10ef45b64ca213ad5dec926f37fa9a0. > > The original diagnosis was incorrect: it appears that the NIC had > PHY polling mode enabled, which meant that it overwrote the PHYs > advertisement register during negotiation. > > Signed-off-by: Russell King Tested-by: Yonglong Liu Had done boot testing, and the networking is fine too. > --- > v2: respun on top of net-next, but I've not yet been able to boot > test this - which is unlikely to be for a while yet. > > The extraneous whitespace change comes from the reversion of the > original patch - I added a "u32 pause" and blank line there. The > patch converting to link modes removed the "u32 pause" but left > the blank line, causing a coding style issue. It seems only right > that a reversion of the original commit fixes that too. > > drivers/net/phy/marvell.c | 16 ---------------- > 1 file changed, 16 deletions(-) > > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c > index 90f44ba8aca7..3ccba37bd6dd 100644 > --- a/drivers/net/phy/marvell.c > +++ b/drivers/net/phy/marvell.c > @@ -842,7 +842,6 @@ static int m88e1510_config_init(struct phy_device *phydev) > > /* SGMII-to-Copper mode initialization */ > if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { > - > /* Select page 18 */ > err = marvell_set_page(phydev, 18); > if (err < 0) > @@ -865,21 +864,6 @@ static int m88e1510_config_init(struct phy_device *phydev) > err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); > if (err < 0) > return err; > - > - /* There appears to be a bug in the 88e1512 when used in > - * SGMII to copper mode, where the AN advertisement register > - * clears the pause bits each time a negotiation occurs. > - * This means we can never be truely sure what was advertised, > - * so disable Pause support. > - */ > - linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, > - phydev->supported); > - linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, > - phydev->supported); > - linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, > - phydev->advertising); > - linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT, > - phydev->advertising); > } > > return m88e1318_config_init(phydev); >