From patchwork Thu Jan 5 16:01:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hariprasad Kelam X-Patchwork-Id: 39658 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp375481wrt; Thu, 5 Jan 2023 08:12:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXs9DpPnjaXcwJlFFSskbr+wwfeuh4fBX6P3cge6PWKA9cK9jRnj/7KU+dlPVQSnFgYFDIhT X-Received: by 2002:a05:6402:450c:b0:47c:445b:b4f with SMTP id ez12-20020a056402450c00b0047c445b0b4fmr45724171edb.32.1672935139505; Thu, 05 Jan 2023 08:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672935139; cv=none; d=google.com; s=arc-20160816; b=MS+8qcnvrRXdU/VTSqvZDqKHI3ZDYu4xVq5lT3PAVyqdAPwUN1XAwBU6gLgXKteWPQ VKUXeIC5MFTVAMvUbzqy5kBbm1hW2Zk53BtF+ITuk/9/kdyUGF+VGjsXqJ/Cqkxe6Kkq rJdmyXcC1VBMm/2An6mvK2Q52oyMv5i8L/YTv/ecIaloTtI7AkeG7MJn0oYR3eT40UxN XACDx8wgKAjPDNMmVNM406IkAu+WSi/TPZOZrmFqAzCExNcLpWebkRwScpLyLw1jmQU+ 88pjp4nhLZfrgz7kkkt3j2t1qsfLN+ZgaiWpP5TsU+F4EIjHo/jMEx9n5fnCX6qdNvWA zwVQ== 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=FGjVwz4OlBB20g+ribOPpXbmff/J4ltHusMxl046W3s=; b=Hq0OTrMDmqFSCdTcGvcOjiIRdbS15m6b1Q9+/yZ36vvwq3FpNZuairETp+0GY5W36/ FpmuVAh0mq3KvEJoACNHA6gcJbtOC9K24uWY9K1GUl131HXX/xpAyNn6OL0Bw+pAfESg 27u3Pn5upvRAVtvReKHTuC/dnwaGRcxPu1JhIc0d6oXvDvCjIw2NehrseF0Dz5f/Cpg8 J/7PZdjngLmfDAHtIls15++kPuQqq4T4DJXhMrKorG09fJl2G4iOJvbEzdg3KbHjghva 5+gSLVMVHKQcHn3Bl+97nMJdQQABkWnB1Z37xgJRuu9tSQ+h5ipZs1Gohh2wIifUfCrc uG3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=iJFqe7AS; 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 m17-20020a056402511100b0048ea96d245asi9318716edd.267.2023.01.05.08.11.51; Thu, 05 Jan 2023 08:12:19 -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=iJFqe7AS; 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 S233094AbjAEQBi (ORCPT + 99 others); Thu, 5 Jan 2023 11:01:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234692AbjAEQBf (ORCPT ); Thu, 5 Jan 2023 11:01:35 -0500 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB9BD1A389; Thu, 5 Jan 2023 08:01:33 -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 305Bx0FX028728; Thu, 5 Jan 2023 08:01:18 -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=FGjVwz4OlBB20g+ribOPpXbmff/J4ltHusMxl046W3s=; b=iJFqe7ASVQZ951bbCihez+iHv9Eu6zZ3Sp6B9kGlm0k3lfZWFDochY0kuKZq7PpG8YT6 cFKpzZ57CIOGPCUK9NjbS7wbgHz8sPNUZ2MMnRuEgyO/A3ipkGSRU3OwzV8jkhKlDot2 alQ2D+K9hzosALRjLZBYKn0DP/BQIytm05tzQ12VO1y7n76vPdlGQaU/hMjEHWuSzkQr U0a+7ynNPqsmkXIa1RZ7p2JNq1Z7JJ9OZYRFaTH0OAALjzryL4aNjCeULxujQe2e+WXA 6LM4iCau2WrnXfHhIiTJt1ng5+4acOl9LQbHLFDErvEE7f1ubyiLxMQHYGjIVCknAtu7 WQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3mwebc42x4-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 05 Jan 2023 08:01:17 -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; Thu, 5 Jan 2023 08:01:12 -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; Thu, 5 Jan 2023 08:01:11 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id BAAD73F704A; Thu, 5 Jan 2023 08:01:08 -0800 (PST) From: Hariprasad Kelam To: , CC: , , , , , , , , Subject: [net PATCHV2] octeontx2-af: Fix LMAC config in cgx_lmac_rx_tx_enable Date: Thu, 5 Jan 2023 21:31:07 +0530 Message-ID: <20230105160107.17638-1-hkelam@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Q8Tk9SliiVcHUPkx0HgR8V6U7e5Nmxqb X-Proofpoint-GUID: Q8Tk9SliiVcHUPkx0HgR8V6U7e5Nmxqb 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-05_07,2023-01-05_01,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?1754199636996016871?= X-GMAIL-MSGID: =?utf-8?q?1754199636996016871?= 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 Reviewed-by: Leon Romanovsky --- v2 * remove unused macro define drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 4 ++-- drivers/net/ethernet/marvell/octeontx2/af/cgx.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) -- 2.17.1 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; } diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.h b/drivers/net/ethernet/marvell/octeontx2/af/cgx.h index fb2d37676d84..5a20d93004c7 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.h @@ -26,7 +26,6 @@ #define CMR_P2X_SEL_SHIFT 59ULL #define CMR_P2X_SEL_NIX0 1ULL #define CMR_P2X_SEL_NIX1 2ULL -#define CMR_EN BIT_ULL(55) #define DATA_PKT_TX_EN BIT_ULL(53) #define DATA_PKT_RX_EN BIT_ULL(54) #define CGX_LMAC_TYPE_SHIFT 40