Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4125508pxb; Mon, 8 Feb 2021 08:31:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9YdlpABwBJD4CtNgtp6Xxgh9yPnmyiMX0zm7c7hua8Xt8F/jMLDJ8GfYXUzar1f0uc7EW X-Received: by 2002:a17:907:da3:: with SMTP id go35mr9697989ejc.26.1612801908763; Mon, 08 Feb 2021 08:31:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612801908; cv=none; d=google.com; s=arc-20160816; b=P040LVtaLNL9m1b9UOZgeQYbOLDmoHQsACJaYBmPkJEow1hFWh1Oi9WPCTraOOsdYZ ZOhxhr1teCfUrrjpHffEVFE1Czv/93TTPJgZtxthiqccmOpXGh6oS7Fi9hZlV+SPVT9t Q9Ht2HtjtYRKlrh68hvOzcs/uy5jXZCDdsKhh5AxdSEHxPeHDw0uDGZuadUhV4tsjvB4 UyT07LZGXewpH8NgporjBqm419VN+b44acm2JajoJmoUp1WsoSJj0SUtX6Kq9Ds6xz+4 ohXUj9rF6lO0xk9MJoaORgV9AqILTylLervA/3TgchfoPEYbtgA/nnvd413cpyhJTYe1 aZBQ== 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=jhrZQWOif0kK1ahDwvFhp72I29wv0UXDw+0560lZUu+Cm3+s/dW0hku2Q3ZkOqafxp SKPTq2u2fL5lW6BloIDGvmKCGseUOTmw4W3SKM+j+G76iCBPzbhqShqC3r1+cUus0Jct lZQ3JmrFBP/QH2euC4+JOfqfOkfv3Zbbu43HM/b3P6ID8w484J62keBo+4GJVby2mzF8 kgyYVcBoiRPmLbqRteIhvmxZJ51IdZWl21O18pe989079RP8HIhLzqA0KerLSxaS8Opq eqqU7vBUa1SgCtSceNRduhcDwIzOAtuV44iBEn9ZeuTrfayxD81RrrKX7fWRB4Xd6fGG Xdxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yYqYY+Iu; 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 t15si6092210edc.372.2021.02.08.08.31.22; Mon, 08 Feb 2021 08:31:48 -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=yYqYY+Iu; 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 S233471AbhBHQ2X (ORCPT + 99 others); Mon, 8 Feb 2021 11:28:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:56488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232887AbhBHPLx (ORCPT ); Mon, 8 Feb 2021 10:11:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF84A64EEF; Mon, 8 Feb 2021 15:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612796935; bh=hEpoRemxNUNq4gd+swVQvh7eAGeFc+AfgUAfeBJHV7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yYqYY+IuR89tDaPGBCAiFQrnEVPaZnPlfiCrrhH4Z+9jnEqcLoYME3pgRWi3kRL9Y JUEv/AQHTOs01zXtmP3/t3ZRmbeW18cyeRFGpPSZAwD6y32URA1sMr+hN/V/mHlGIN ietxO2Kq7NTiJ+0JLQSLk3eEhfURLmOq1UUPxVUQ= 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 4.19 09/38] net: mvpp2: TCAM entry enable should be written after SRAM data Date: Mon, 8 Feb 2021 16:00:56 +0100 Message-Id: <20210208145806.505889756@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145806.141056364@linuxfoundation.org> References: <20210208145806.141056364@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