Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp11503pxb; Fri, 15 Jan 2021 04:37:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIShAMU8UwHPpaAdleVPrXxFgXRQKLNNV3Ykh6v0y4VMJmqyZavbgSOPn2zUzyEml6yf9l X-Received: by 2002:a17:906:af49:: with SMTP id ly9mr8401779ejb.38.1610714272089; Fri, 15 Jan 2021 04:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610714272; cv=none; d=google.com; s=arc-20160816; b=gPOq/jUqLWe6qT0KkWM1Suhk7D/QlyoQXAghily4Q1lRtliaMr+ZQosAdwW9qYm3gh 9WuR4gJARCHvIOvNF2uGYza1wvtR2WACub+yQicEFrTGUnv6hLkrQgwhfOkz+AloPIb9 j43Y0deBSpKD9Bkjjt6pn6uWEkpXiB2dRpcaXhOk/FfRVt1Ky+gq9uHFYzpPg9tNatM3 Fzpa990AAWTb/5RROSh3shQTAblv1uybVQdytQb9L31IqyJYM2NUddoUCD/+j56X7vAm 2lgAEySTGdMNGXaizggoJB7EtwLeAfA6A97JsD11TuHTZkHizCREF6YARm58g/JS0mh9 JR1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AWHBo9KqapUC5/gwsMeLFlyBSqZeGOby90uZKnSI5Cw=; b=ZxuDcaCY/4G1vx9Vnxk7nNII6lOekGlk+mCciu9Uq8yzpPColL1NVhM9T2r4ApKhBP AwSXrclYsPVx7/gT/8//l2zpzZTuyOXP95CgMcyq8EUhTPFBCJQ0xJ2obr5zCtp9gKb0 rmbAss7mf5Bwr/JTyZdEtSZ6tMiDoDfCZJPCMIHti680/P89bjkJTipy45yaVXBq4jso PMSLv2Lpyz9gj6pkWiq0i82nwqHZxXgMWvQBeo5XXU8+czHOCaQ6IhTr4Yjtv5mwD3++ VkUqdXcET92D9yK2tMfS6+k7WCD45HuD85iqyKcmnhwIAmvLcmgwNxBsx9l+F5VRQ1+e zEBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="KS/JnGsH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si1884566ejr.353.2021.01.15.04.37.28; Fri, 15 Jan 2021 04:37:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="KS/JnGsH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387733AbhAOMfm (ORCPT + 99 others); Fri, 15 Jan 2021 07:35:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:42498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387720AbhAOMfk (ORCPT ); Fri, 15 Jan 2021 07:35:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C80EB223E0; Fri, 15 Jan 2021 12:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610714125; bh=9MU4LmVgyyReGjyQ4bO0Mk8SP7C9PS3SsmbE7CqzHXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KS/JnGsHFIUOLZR5sochHxMnpYLCGnOI2vROXhhtvnBqtC1ugtn97ef7ux0rZNL13 2etG8agqCDukP4OY1gOLZDSbTZJNUNbQXrDV9mdrH9a7AJLexjY59H2BHz3hD4+fij RtysNsM8xT7dHb8M4C2sw5leyOMnxTpr+sgjxPPY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Chulski , Marcin Wojtas , Jakub Kicinski Subject: [PATCH 5.4 58/62] net: mvpp2: disable force link UP during port init procedure Date: Fri, 15 Jan 2021 13:28:20 +0100 Message-Id: <20210115122001.194443189@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210115121958.391610178@linuxfoundation.org> References: <20210115121958.391610178@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Chulski commit 87508224485323ce2d4e7fb929ec80f51adcc238 upstream. Force link UP can be enabled by bootloader during tftpboot and breaks NFS support. Force link UP disabled during port init procedure. Fixes: f84bf386f395 ("net: mvpp2: initialize the GoP") Signed-off-by: Stefan Chulski Acked-by: Marcin Wojtas Link: https://lore.kernel.org/r/1608216735-14501-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4545,7 +4545,7 @@ static int mvpp2_port_init(struct mvpp2_ struct mvpp2 *priv = port->priv; struct mvpp2_txq_pcpu *txq_pcpu; unsigned int thread; - int queue, err; + int queue, err, val; /* Checks for hardware constraints */ if (port->first_rxq + port->nrxqs > @@ -4559,6 +4559,18 @@ static int mvpp2_port_init(struct mvpp2_ mvpp2_egress_disable(port); mvpp2_port_disable(port); + if (mvpp2_is_xlg(port->phy_interface)) { + val = readl(port->base + MVPP22_XLG_CTRL0_REG); + val &= ~MVPP22_XLG_CTRL0_FORCE_LINK_PASS; + val |= MVPP22_XLG_CTRL0_FORCE_LINK_DOWN; + writel(val, port->base + MVPP22_XLG_CTRL0_REG); + } else { + val = readl(port->base + MVPP2_GMAC_AUTONEG_CONFIG); + val &= ~MVPP2_GMAC_FORCE_LINK_PASS; + val |= MVPP2_GMAC_FORCE_LINK_DOWN; + writel(val, port->base + MVPP2_GMAC_AUTONEG_CONFIG); + } + port->tx_time_coal = MVPP2_TXDONE_COAL_USEC; port->txqs = devm_kcalloc(dev, port->ntxqs, sizeof(*port->txqs),