Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3863214rdg; Wed, 18 Oct 2023 08:07:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjIGPUaKXAmHQyXLMei4s87zm1W1CMfiP9VK7yDoN8ApLkk5DZhQPYru1cEcU3oZwacYpQ X-Received: by 2002:a05:6a20:e110:b0:17b:51a1:9c4 with SMTP id kr16-20020a056a20e11000b0017b51a109c4mr2119517pzb.61.1697641676250; Wed, 18 Oct 2023 08:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697641676; cv=none; d=google.com; s=arc-20160816; b=urkKmI/uYWa/i3wOg7SO/UlHa5bitokAttDoT6Q0A0t7D6P+FrrqPQD1I28P/mNE+7 zff1bcgiFOuf06ECXN1gTVGgeahKsbGxad4eu0SDJb2DOkYJL2uV3vIrj4JgH+k4VTO1 rSd342VayiYvJx7QefKA7bGRQysBLz+W72O86PRmwxyWc/Zx/iop/YLPD3H7M9BJC97+ LD2v3j9JpygwXfFyX/W5wrJ9GsNduHutWRrwcIwrdSRhse3EU6b8o2/4Te2n6hYt8Kyy YgNC+83cqu4wwuf2ZfI/d8n/Ov6cY5JLv/sXA4+GtOLv7nyDE/2AYg7+5uRxqpbH5yRU jzQw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Xfb8xAPoeSQVAD4+8cJSBA5CbVXNlnkSmUPpryI54xI=; fh=01G/APEbmx3+7g0HNKBRGxUoyn5JwF4UWfgsy0E1GPo=; b=JZLxyE36XF/o/nsyRDMDSVclmh82MNquyHDu0uvPmCapZFgcw9p3FZtH+sTl9p1rht RVpYE7W/mPUAQBpx+dcVEMOD9izkROgnzf5E8wl00zH//KgZr7FbfChxHMjRUjXVJ/oF rIhh1Yw6xHHLogRVKN6SKwnR59Gm+7HTi/vhMpMpraVTuFWTRg0vUW9BcYPxtib1FJAl tUI7Mech/Q6BluvLmytloI0/W4OyjmHJUsavnGXa/MVi1Loe97iS1snAvGl3euNZ2yBH Y3vieSBEO0JLTPgcb3WNr+dQVWvUPXkei/5YzyQ/4RWWemZbQIgbKPD/lD2Jty/4rJ7N +XUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=U2NBdHD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u3-20020a656703000000b005ac8d44bad4si2281796pgf.592.2023.10.18.08.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=U2NBdHD3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0F20080BD778; Wed, 18 Oct 2023 08:07:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344643AbjJRPHo (ORCPT + 99 others); Wed, 18 Oct 2023 11:07:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbjJRPHn (ORCPT ); Wed, 18 Oct 2023 11:07:43 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 582BE94; Wed, 18 Oct 2023 08:07:42 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39IF7NeE087456; Wed, 18 Oct 2023 10:07:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1697641643; bh=Xfb8xAPoeSQVAD4+8cJSBA5CbVXNlnkSmUPpryI54xI=; h=From:To:CC:Subject:Date; b=U2NBdHD38jXrWR6Y/XM2VFYzaq5CR4k/MWZajymYWsv01Nn/UMT0uUqsz9VMB2VX2 HBU8Ipjct3GNNmxP9uQqY+T8UagilE7ubTT82VFSSOa+Jt4T6aAmTxGTdOyAygz8+N y5Gh9Q4cLsEKzA2lrLkAdcwZaoTJUsUOhZgg1Iq8= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39IF7N1G084046 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Oct 2023 10:07:23 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 18 Oct 2023 10:07:23 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 18 Oct 2023 10:07:23 -0500 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39IF7N3C093689; Wed, 18 Oct 2023 10:07:23 -0500 Received: from localhost (danish-tpc.dhcp.ti.com [10.24.69.31]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 39IF7MEm011182; Wed, 18 Oct 2023 10:07:22 -0500 From: MD Danish Anwar To: Andrew Lunn , Grygorii Strashko , Vignesh Raghavendra , "Jacob Keller" , Roger Quadros , "MD Danish Anwar" , Paolo Abeni , "Jakub Kicinski" , Eric Dumazet , "David S. Miller" CC: , , , Subject: [PATCH net v3] net: ti: icssg-prueth: Fix r30 CMDs bitmasks Date: Wed, 18 Oct 2023 20:37:15 +0530 Message-ID: <20231018150715.3085380-1-danishanwar@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 08:07:53 -0700 (PDT) The bitmasks for EMAC_PORT_DISABLE and EMAC_PORT_FORWARD r30 commands are wrong in the driver. Update the bitmasks of these commands to the correct ones as used by the ICSSG firmware. These bitmasks are backwards compatible and work with any ICSSG firmware version. Fixes: e9b4ece7d74b ("net: ti: icssg-prueth: Add Firmware config and classification APIs.") Signed-off-by: MD Danish Anwar --- Cc: Andrew Lunn Cc: Ravi Gunasekaran Changes from v2 to v3: *) Updated the commit message mentioning that the patch is infact backwards compatible after testing the patch with multiple firmwares. The patch works with both old and new ICSSG firmwares. *) Rebased on latest net/main. Changes from v1 to v2: *) Added firmware version in commit message as asked by Ravi. *) Mentioned in commit message that the patch is not backwards compatible as asked by Andrew. v1: https://lore.kernel.org/all/20231013111758.213769-1-danishanwar@ti.com/ v2: https://lore.kernel.org/all/20231016161525.1695795-1-danishanwar@ti.com/ drivers/net/ethernet/ti/icssg/icssg_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/icssg/icssg_config.c b/drivers/net/ethernet/ti/icssg/icssg_config.c index 933b84666574..b272361e378f 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_config.c +++ b/drivers/net/ethernet/ti/icssg/icssg_config.c @@ -379,9 +379,9 @@ int icssg_config(struct prueth *prueth, struct prueth_emac *emac, int slice) /* Bitmask for ICSSG r30 commands */ static const struct icssg_r30_cmd emac_r32_bitmask[] = { - {{0xffff0004, 0xffff0100, 0xffff0100, EMAC_NONE}}, /* EMAC_PORT_DISABLE */ + {{0xffff0004, 0xffff0100, 0xffff0004, EMAC_NONE}}, /* EMAC_PORT_DISABLE */ {{0xfffb0040, 0xfeff0200, 0xfeff0200, EMAC_NONE}}, /* EMAC_PORT_BLOCK */ - {{0xffbb0000, 0xfcff0000, 0xdcff0000, EMAC_NONE}}, /* EMAC_PORT_FORWARD */ + {{0xffbb0000, 0xfcff0000, 0xdcfb0000, EMAC_NONE}}, /* EMAC_PORT_FORWARD */ {{0xffbb0000, 0xfcff0000, 0xfcff2000, EMAC_NONE}}, /* EMAC_PORT_FORWARD_WO_LEARNING */ {{0xffff0001, EMAC_NONE, EMAC_NONE, EMAC_NONE}}, /* ACCEPT ALL */ {{0xfffe0002, EMAC_NONE, EMAC_NONE, EMAC_NONE}}, /* ACCEPT TAGGED */ base-commit: 2915240eddba96b37de4c7e9a3d0ac6f9548454b -- 2.34.1