From patchwork Thu Oct 26 12:28:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 830613 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yN6074NbWz9t2r for ; Thu, 26 Oct 2017 23:34:47 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932217AbdJZMeo (ORCPT ); Thu, 26 Oct 2017 08:34:44 -0400 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]:41911 "EHLO emh07.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932185AbdJZMeo (ORCPT ); Thu, 26 Oct 2017 08:34:44 -0400 X-Greylist: delayed 365 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Oct 2017 08:34:43 EDT Received: from darkstar.musicnaut.iki.fi (85-76-65-71-nat.elisa-mobile.fi [85.76.65.71]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id B23394061; Thu, 26 Oct 2017 15:28:36 +0300 (EEST) Date: Thu, 26 Oct 2017 15:28:36 +0300 From: Aaro Koskinen To: "David S. Miller" , Dan Carpenter , Andrew Lunn , netdev@vger.kernel.org Subject: [REGRESSION, BISECTED] Broken networking with net/phy/marvell Message-ID: <20171026122836.zoggs44rkasflr3m@darkstar.musicnaut.iki.fi> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, When upgrading from v4.13 to v4.14-rc6 on OpenRD Client, the box loses network connectivity. Bisection points to: commit 5987feb38aa55e035ce5376c02aba88a604cc881 Author: Dan Carpenter Date: Fri Aug 4 11:17:21 2017 +0300 net: phy: marvell: logical vs bitwise OR typo However, it seems this commit just unhides another issue in the original commit 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay configuration"): when we are configuring the MSCR delay bits, we are probably clearing the bits with a wrong mask (i.e. we might be disabling something else not intended)... I have tested the below change and it seems to fix the networking. Any comments? A. diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 15cbcdb..500d7c1 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -474,7 +474,7 @@ static int m88e1121_config_aneg_rgmii_delays(struct phy_device *phydev) goto out; } - mscr &= MII_88E1121_PHY_MSCR_DELAY_MASK; + mscr &= ~MII_88E1121_PHY_MSCR_DELAY_MASK; if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) mscr |= (MII_88E1121_PHY_MSCR_RX_DELAY |