From patchwork Sun Apr 23 09:54:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 86675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2112849vqo; Sun, 23 Apr 2023 02:56:22 -0700 (PDT) X-Google-Smtp-Source: AKy350b0hvwL0CkIeAryKrAy3LdVzOa2W5F6f4c12GkxZbgjH7Qt5jEuPV0okTeYpsltLyzNzZHY X-Received: by 2002:a17:902:e543:b0:1a1:ee8c:eeba with SMTP id n3-20020a170902e54300b001a1ee8ceebamr13245236plf.59.1682243781840; Sun, 23 Apr 2023 02:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682243781; cv=none; d=google.com; s=arc-20160816; b=fllT4j/fOPj2dQTc1HtKIJ2eW533d0l5DqtJSp/BytpRFHEcqEPg9748AqLVzvDYzF LZH4h79bCymewcTCi/75sOOIP5ic51LtkT+C7sSxYs6QNJO2+waifMx/N6kD8xXrxRl0 XNRtOZQnQ9ZBj8KWsJ0C71V+r9xcAYNtrG/eXkVULIv/1Xt66HZ5+zWthfQ8zATQoY7w IR0V2Q5ahV8N07x6jGExQ67KKM9cVERU5P1zYY7mX6xLuq4XVS22TlPvaLnngLnQPuyU WOEasBZ78cFVeNfMoHaGcrXG+qOXg0HenqkblSaH/cARcTLYLzTq6pbhLYTMfDxoH+fC 8QzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KzMK/K65loY1xIeXVTIjDHwBpYHIq8+pb5BAKV4qo/A=; b=dFSAPZsNpWuACYwi5Pm1RNNGUsGdtju+NqSBzfWVKd4+YU6jYeLTzvbXt7S1rlBnNY ZJFOfBgqR7s27EfdqPqf8Lzezpwtl56JFXqZYAEFnBLptPGHPuPcGeBxUThDeunhYUXt z8q38CFeETcWUHDk8/u4YXjQ+2CxQe8XB078DCXGPmt8a/NCk3rHO7swYSui8geg1J4D Xs1mvthrAMnY7MxwdPHlZway76rayjTRXo/5SFPH08R+N6uO0l3OquFukmDctBzUt65s hudMOeqaePylXuvAofu8GMZmjKWFGSoiCU/TgSQmvsAnRoXPtafyQyP+q2oZoZn81HhG bRDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=fpovbT7G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a170902bd8d00b001a531f29044si8109651pls.521.2023.04.23.02.56.09; Sun, 23 Apr 2023 02:56:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=fpovbT7G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbjDWJzT (ORCPT + 99 others); Sun, 23 Apr 2023 05:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229977AbjDWJzR (ORCPT ); Sun, 23 Apr 2023 05:55:17 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7C8C10FD; Sun, 23 Apr 2023 02:55:15 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33N4UDCc016372; Sun, 23 Apr 2023 02:55:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=KzMK/K65loY1xIeXVTIjDHwBpYHIq8+pb5BAKV4qo/A=; b=fpovbT7GQI4OtwCNSxNP7HO5IbJrhVyWrK6g8LfJ1qHxGgtIPaaWAOJ6LQnelF1LvrcM GaQ65BRbPJmM0Ws1fsp7eVC3HnRuUqLfGmyRfPSNZfx+P9/z79aRl7bnGwrEk6SNNVEy YyhEqWB8byE0DcFVdo0vT5Id0sDSSECQXj91bSQJ993h43YEEF80wPE8dNiK4h+6icpk loNnMsJyNxMArNUIKnPZTSAaFUfu/fTORbiu+pk3RRwsqL3oDJSzfUJk21N/ZIhaexH/ ASibx58iz0f3GCrDAX4M/M9X2naTPNEkMO1iV1qaddfjWjsReg3Lb//2bGeVexNB1kiE lA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q4f3p2pqk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 23 Apr 2023 02:55:08 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 23 Apr 2023 02:55:06 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 23 Apr 2023 02:55:06 -0700 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 49C083F70AD; Sun, 23 Apr 2023 02:55:03 -0700 (PDT) From: Geetha sowjanya To: , CC: , , , , , , , , Subject: [net PATCH 2/9] octeontx2-af: mcs: Write TCAM_DATA and TCAM_MASK registers at once Date: Sun, 23 Apr 2023 15:24:47 +0530 Message-ID: <20230423095454.21049-3-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230423095454.21049-1-gakula@marvell.com> References: <20230423095454.21049-1-gakula@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: CaqQRHOJueD5JUClqU1epIUU-kjw-mYm X-Proofpoint-GUID: CaqQRHOJueD5JUClqU1epIUU-kjw-mYm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-23_06,2023-04-21_01,2023-02-09_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763960455653977158?= X-GMAIL-MSGID: =?utf-8?q?1763960455653977158?= From: Subbaraya Sundeep As per hardware errata on CN10KB, all the four TCAM_DATA and TCAM_MASK registers has to be written at once otherwise write to individual registers will fail. Hence write to all TCAM_DATA registers and then to all TCAM_MASK registers. Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky --- drivers/net/ethernet/marvell/octeontx2/af/mcs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c index 492baa0b594c..148417d633a5 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs.c @@ -473,6 +473,8 @@ void mcs_flowid_entry_write(struct mcs *mcs, u64 *data, u64 *mask, int flow_id, for (reg_id = 0; reg_id < 4; reg_id++) { reg = MCSX_CPM_RX_SLAVE_FLOWID_TCAM_DATAX(reg_id, flow_id); mcs_reg_write(mcs, reg, data[reg_id]); + } + for (reg_id = 0; reg_id < 4; reg_id++) { reg = MCSX_CPM_RX_SLAVE_FLOWID_TCAM_MASKX(reg_id, flow_id); mcs_reg_write(mcs, reg, mask[reg_id]); } @@ -480,6 +482,8 @@ void mcs_flowid_entry_write(struct mcs *mcs, u64 *data, u64 *mask, int flow_id, for (reg_id = 0; reg_id < 4; reg_id++) { reg = MCSX_CPM_TX_SLAVE_FLOWID_TCAM_DATAX(reg_id, flow_id); mcs_reg_write(mcs, reg, data[reg_id]); + } + for (reg_id = 0; reg_id < 4; reg_id++) { reg = MCSX_CPM_TX_SLAVE_FLOWID_TCAM_MASKX(reg_id, flow_id); mcs_reg_write(mcs, reg, mask[reg_id]); }