Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3419652pxf; Mon, 29 Mar 2021 01:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzUK1kNojLriWErY9UTKyUA5z143Hu+wV5YFvwKhwNCSFRVWXrwn2r8wGy4+a9dFHCM7rT X-Received: by 2002:a17:907:d1b:: with SMTP id gn27mr27253564ejc.227.1617006658313; Mon, 29 Mar 2021 01:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006658; cv=none; d=google.com; s=arc-20160816; b=Adn+OfYhSdDvHircpEqSzULT1T2cwP8lwQZRFg3cYFEMrweAFUsqN6/dOvEN/O2Sn9 jyH0BkI1lZSQfETcAb+TYZ1/GLbB7K9y9YMvjVJjA7MWq4Z8p4t/Cq3nEo1nW7KOWBIR 01d0iD4o6L0T9TTL/bBWHZUBZuG6whW3LPtlTemSiXLgZ7XJwVclW9dMDpVcqTVti7+Q Z7ipqVQLil3XTGaSmZkmQXEjRZksMIf+c0riuMQ0ct08k6p5ii7mWL1GXU/nxA4TQM/z TlPcB/4WswqXr81z86T6g0QZ5LxFSNKvhXPLzCzNw7aEYs3RR+VSueAtkPyWkyxM1a9N 32/Q== 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=dmYss0rtOui5pth7vS1Q5uB2m3wZ5ekopw9o0RPW7sU=; b=KJrIpeJpEEDwpFS7FiHMu3ieFQWLTuFuAvQK2ehHo+VxJgB9XMOtcdPQ5vpvyta+jO TMuPKOCyT0czhIY2F7y7kElYUDnns/Hr1rmKPU/jBrZ/C60+9c/p5aISBPex+3Tamxw7 iTvbDcv+lti5vk0bHXAPBJgeQjjZkVjc3R+/oGdcsKkv/LbsCbUEUqBT4cZcxJxidTNo baKf/ACLNptJpCQMvNGInI92w0m0GlofW8QXMNBDA0IxiQ48kwdQbk6ZDRTuBG7OhRpZ e9i2CVSoz5HctjNCc7GF7wY5+cwHqsF+wecruwMb1Uzj9j7b4hr9tdr+h9uJ9irJnIst 0aLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="BMPO/Sbl"; 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 k12si12824322ejq.734.2021.03.29.01.30.35; Mon, 29 Mar 2021 01:30:58 -0700 (PDT) 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="BMPO/Sbl"; 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 S232312AbhC2I3L (ORCPT + 99 others); Mon, 29 Mar 2021 04:29:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:34276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbhC2ISq (ORCPT ); Mon, 29 Mar 2021 04:18:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B46BE61554; Mon, 29 Mar 2021 08:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005926; bh=hK655A0tpeBXhMhWiefnKl+u8tNN8/aWvVqT1UDwpQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMPO/SblhtqzOoou0oDk5ULPE+GeLYpPWfejFoQS8p9jz+w2LZH/WC4R3A2CoOgb1 9LXaL+NkmqjxjM+mYFn2g+aMrlNB7O5Mcb04xbj2Af9VqS2za2E1GykssSU+luOrV+ sMXIaQZEqSPcdpG8YDoyjXztafyAW1Ln0L++E1f4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Marginean , Claudiu Manoil , Jason Liu , Vladimir Oltean , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 027/221] net: enetc: set MAC RX FIFO to recommended value Date: Mon, 29 Mar 2021 09:55:58 +0200 Message-Id: <20210329075630.083747050@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@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: Alex Marginean [ Upstream commit 1b2395dfff5bb40228a187f21f577cd90673d344 ] On LS1028A, the MAC RX FIFO defaults to the value 2, which is too high and may lead to RX lock-up under traffic at a rate higher than 6 Gbps. Set it to 1 instead, as recommended by the hardware design team and by later versions of the ENETC block guide. Signed-off-by: Alex Marginean Reviewed-by: Claudiu Manoil Reviewed-by: Jason Liu Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/enetc/enetc_hw.h | 2 ++ drivers/net/ethernet/freescale/enetc/enetc_pf.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_hw.h b/drivers/net/ethernet/freescale/enetc/enetc_hw.h index 21a6ce415cb2..2b90a345507b 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h +++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h @@ -234,6 +234,8 @@ enum enetc_bdr_type {TX, RX}; #define ENETC_PM0_MAXFRM 0x8014 #define ENETC_SET_TX_MTU(val) ((val) << 16) #define ENETC_SET_MAXFRM(val) ((val) & 0xffff) +#define ENETC_PM0_RX_FIFO 0x801c +#define ENETC_PM0_RX_FIFO_VAL 1 #define ENETC_PM_IMDIO_BASE 0x8030 diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c index 83187cd59fdd..68133563a40c 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c @@ -490,6 +490,12 @@ static void enetc_configure_port_mac(struct enetc_hw *hw) enetc_port_wr(hw, ENETC_PM1_CMD_CFG, ENETC_PM0_CMD_PHY_TX_EN | ENETC_PM0_CMD_TXP | ENETC_PM0_PROMISC); + + /* On LS1028A, the MAC RX FIFO defaults to 2, which is too high + * and may lead to RX lock-up under traffic. Set it to 1 instead, + * as recommended by the hardware team. + */ + enetc_port_wr(hw, ENETC_PM0_RX_FIFO, ENETC_PM0_RX_FIFO_VAL); } static void enetc_mac_config(struct enetc_hw *hw, phy_interface_t phy_mode) -- 2.30.1