Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4139745pxb; Mon, 8 Feb 2021 08:51:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDfq5JH+JbhvTkdV0xvEAiUzuZ+6gAPhUi+7XGrGR9GPJ3vS9z2/Hotne2WJm/T71MwJjr X-Received: by 2002:a17:906:3f89:: with SMTP id b9mr17303886ejj.204.1612803079376; Mon, 08 Feb 2021 08:51:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612803079; cv=none; d=google.com; s=arc-20160816; b=mDNBeS/lHqftgqVP7JdPM4WTSVsbnIT6W9l3DVXrxJmb48epNuo8xz12QMlyml3FT1 /bxcM1ZBRccdqi1asAcQjVvg9waFCwymT316zjKnECtjXbhnWiw7qPyF46CEHREOUFyq l4aU3Efz5ErAVpYV4YWucfxb0oksTTMknSsAvGopNT4KpaoiajKlpeZENUlwwnjPnMsD UJelOl6+gcVxw3qFHbIPA/f9Gd38PENxM4fV7I7RkBaxOdcaNGQ0nAdrReB6ASIwpLJu nJzKzgQmINnG3WGeiriA4LQVxRgIfXi/2VZkx5LzBOXKd2G5h2Wvat4Yv2bPW9Niaur1 9NUQ== 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=mex7U4+B+dkOA2IV7w1dIksQ8ySm78rm0I5Kphr0ODs=; b=UiDxIJVpzOb7Qsp5FwCKe2c1MCl5RSI77wXMR5T4P4haB864Xnq83ZOXpr4a1HMJYC 49VOKQGvgzvbMf9EtiWfCmGEeiCgb5vNw6uA/DJWY1NJoAIvXIQ0DXa2V1RsuVubxY8U cDT9seh8xs7CcbsXJzA9zHL1xASWo9Z4uBaYvijBGn0ST5wnrdZ0C7+yrcz/QBFhA7SE 1MrByQ+IFA++P8G2rqxMlJzdjZ8YpqvzHVgEEEdUUx0XtN72+vT8SvODsXSRspdfjnZm e1dTlzmRWMb25phGfy1Oddy0ScNVCEJG6PgYJqzOWn/id/13JJeQgcMICGAtQNQTrsIF 1jhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UE6zO35i; 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 y63si11746660ede.490.2021.02.08.08.50.51; Mon, 08 Feb 2021 08:51:19 -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=UE6zO35i; 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 S234561AbhBHQrM (ORCPT + 99 others); Mon, 8 Feb 2021 11:47:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:60984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233567AbhBHPQM (ORCPT ); Mon, 8 Feb 2021 10:16:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E09564E8C; Mon, 8 Feb 2021 15:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797080; bh=hEpoRemxNUNq4gd+swVQvh7eAGeFc+AfgUAfeBJHV7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UE6zO35isvDBFiYkDa95xQqvJ/ABzdOxjkslS/kU/8B0u9dncxRdRXzAaX9rbjCob 14N2jVt+o264TFh3dWkDaY6MK8S3O7gyqQpAG10dapaB3V0jCwYJRaOjw9nMPXmjS5 0oTKPo2fPKa2zMxRC2u1HZAKvkZcMtBjhjWpgiqs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Chulski , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.4 18/65] net: mvpp2: TCAM entry enable should be written after SRAM data Date: Mon, 8 Feb 2021 16:00:50 +0100 Message-Id: <20210208145810.943418915@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145810.230485165@linuxfoundation.org> References: <20210208145810.230485165@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 [ Upstream commit 43f4a20a1266d393840ce010f547486d14cc0071 ] Last TCAM data contains TCAM enable bit. It should be written after SRAM data before entry enabled. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Stefan Chulski Link: https://lore.kernel.org/r/1612172139-28343-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c index a30eb90ba3d28..dd590086fe6a5 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c @@ -29,16 +29,16 @@ static int mvpp2_prs_hw_write(struct mvpp2 *priv, struct mvpp2_prs_entry *pe) /* Clear entry invalidation bit */ pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK; - /* Write tcam index - indirect access */ - mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index); - for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++) - mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]); - /* Write sram index - indirect access */ mvpp2_write(priv, MVPP2_PRS_SRAM_IDX_REG, pe->index); for (i = 0; i < MVPP2_PRS_SRAM_WORDS; i++) mvpp2_write(priv, MVPP2_PRS_SRAM_DATA_REG(i), pe->sram[i]); + /* Write tcam index - indirect access */ + mvpp2_write(priv, MVPP2_PRS_TCAM_IDX_REG, pe->index); + for (i = 0; i < MVPP2_PRS_TCAM_WORDS; i++) + mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]); + return 0; } -- 2.27.0