From patchwork Wed Jan 4 16:32:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 38991 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5236713wrt; Wed, 4 Jan 2023 08:37:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsZImGJjuFXyDQAu3bSf2Z3vUdAtLDLWRLPq8WAUhaUFFEftOakoqAX1rO0VMk1oi3Y0BiZ X-Received: by 2002:a17:906:7747:b0:7c1:1804:a0c7 with SMTP id o7-20020a170906774700b007c11804a0c7mr39876058ejn.75.1672850224269; Wed, 04 Jan 2023 08:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672850224; cv=none; d=google.com; s=arc-20160816; b=ay6JQRiJSZZyyj5f7kRb+iZXmgapFpwe2t4Mx98BVkAmKQnK0LIbMITS2L/w30ldQw XKOHJBwEccuFQCKbVsu44/KN7aTSopKWgGLmvBKdVWwNsjKCuQPBsQwS6m5ozdQ1nGJ6 q7ZS5DJ5YtQFDVtivhS2NQvb7zVLXQlp5vxtFnn9anVnmPrg78peO+/OzfiDQql8chJh 43YuJMOS9djARDuQTZmF9v+oxNiOhHEjrUs2mfm4IxrDUFqhP1fExJGCYPYH3ddZPz3q 0onUSwXg26AkYOxkYSQEAgWg7rL21SUTZD5NFfhjQSLfz0hS+Ng9mgRHB8QT6TFJd0DM qcYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=XvAZtcDafs9da5L8+27SQ+lEJe4BO27QZTE7M0uYv58=; b=KSl5Rhody9OKSlgzmsfixZG4APoGAggzTj5MNZzSXkxD62KoELt0smcOmTvVlhSfeE wrN27sPvfJ9fbqtla9skXaOTSQ1JMQFK3JYW77Flxf731NrC5UgaHzBUA5izgn19kLGg OT9ox/FvbXba2Z8MioUYU9kVwqI2LXWCWT6KdJedE5nU/O4b2TWMoA7DXDDj71CyvaxL FD4gV+pz4kVZbBxL859taEu0tPMZ7e7x1WWwnloTsdi/3Qd9s5+xvQbBQR95TYbq8cFS RI5NWx7sd+zpoWcrMg35Fk8dZFbCF4oa46E/R1CCMt7B+Ig2qIRy9asT8oDh9D+lhJWL 0sRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=MuWKP8kv; 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 di10-20020a170906730a00b0082372aef3absi13360608ejc.284.2023.01.04.08.36.41; Wed, 04 Jan 2023 08:37:04 -0800 (PST) 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=MuWKP8kv; 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 S239606AbjADQc4 (ORCPT + 99 others); Wed, 4 Jan 2023 11:32:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239864AbjADQco (ORCPT ); Wed, 4 Jan 2023 11:32:44 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A3481ADB7; Wed, 4 Jan 2023 08:32:43 -0800 (PST) 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 3044wxe8031488; Wed, 4 Jan 2023 08:32:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=XvAZtcDafs9da5L8+27SQ+lEJe4BO27QZTE7M0uYv58=; b=MuWKP8kvKZkBPO12s8LzLk1ECrfYQ1oynMoi85JAUtX4AoBS57YfsqHE4fC0OsR+9Q2M xHMLD8Z4QpPhhMaplSxEz8M+rohRJEXuv2YRAdxPYHUcEk5vu1brypIhLaBfSv/Eqs+V 2Bp3MMOGt2wjFzml67WqRLc71qdLpAu1nPcLzJ/+N3FwoaWconTHVN0ZMaPxqqG2+C/T vk9MVZppq52RFpPhqG6HElDSb5OxnGy5tF7fVluvfa8t1zQiu99gADIyGP5SQFn3Avvq oxmSHrnAjz9MHOHAOrthLDNMcS2f2QTAsQOOeX6BT/wSDwo5K6x1R0PY4WUV1OWaoQLV /Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3mtnftm9qk-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 04 Jan 2023 08:32:30 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 4 Jan 2023 08:32:28 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Wed, 4 Jan 2023 08:32:28 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 620BB3F7076; Wed, 4 Jan 2023 08:32:24 -0800 (PST) From: Hariprasad Kelam To: , CC: , , , , , , , , , "Angela Czubak" , Hariprasad Kelam Subject: [net PATCH] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Date: Wed, 4 Jan 2023 22:02:20 +0530 Message-ID: <20230104163220.954-1-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-GUID: K6V-07CX3uGrjWPa79dfhtZu5kgBOOMy X-Proofpoint-ORIG-GUID: K6V-07CX3uGrjWPa79dfhtZu5kgBOOMy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-04_07,2023-01-04_02,2022-06-22_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 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?1754110597136694091?= X-GMAIL-MSGID: =?utf-8?q?1754110597136694091?= From: Angela Czubak PF netdev can request AF to enable or disable reception and transmission on assigned CGX::LMAC. The current code instead of disabling or enabling 'reception and transmission' also disables/enable the LMAC. This patch fixes this issue. Fixes: 1435f66a28b4 ("octeontx2-af: CGX Rx/Tx enable/disable mbox handlers") Signed-off-by: Angela Czubak Signed-off-by: Hariprasad Kelam --- drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c index b2b71fe80d61..724df6398bbe 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c @@ -774,9 +774,9 @@ int cgx_lmac_rx_tx_enable(void *cgxd, int lmac_id, bool enable) cfg = cgx_read(cgx, lmac_id, CGXX_CMRX_CFG); if (enable) - cfg |= CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN; + cfg |= DATA_PKT_RX_EN | DATA_PKT_TX_EN; else - cfg &= ~(CMR_EN | DATA_PKT_RX_EN | DATA_PKT_TX_EN); + cfg &= ~(DATA_PKT_RX_EN | DATA_PKT_TX_EN); cgx_write(cgx, lmac_id, CGXX_CMRX_CFG, cfg); return 0; }