Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2043232iog; Sun, 26 Jun 2022 05:20:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uPHCJIccO9VCagUVIr8HceD9/KXwGpgJmwP7l4qK0DXFCNA/1yJeTN1oCEHTzlrjwv8FCh X-Received: by 2002:a63:7b5c:0:b0:40d:684:b760 with SMTP id k28-20020a637b5c000000b0040d0684b760mr7749368pgn.323.1656246019012; Sun, 26 Jun 2022 05:20:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656246019; cv=pass; d=google.com; s=arc-20160816; b=zoK5dzlvPtOxOyCRTehrmt9oMrJm3JtOGDeYC6X17Qfiz885CjBMAzZNqdL37+6Bks qLrsH0kMKkYm/K2HwYue7i59PST38Lic0VsjFxmhy6kVU+XPZLSvibu71nQ1z4mV5zKC OaQB4Wli7+qiw8G9Gdadzh4992qLKue0yaRR/7Hw4LCSwkII+L+VCXx8CCBsWwBz5oCJ is4qT8PTzdOJuNwL6qgiwAqDEJk3RgjL76F809aFZu5YmENhja8+aSdU3r5Hhcz9DAje jVS+4iPPjJByulSvATAk6MHm5NzVnECVqXvITeTk/oCL0CYN0P7WI8QiNk5qGAKRN1MT m8sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u2CWzUwfTmi69rRRopT8r58PkrAYFlpdBLCv2NGY408=; b=rLkO8z8T4oAEUXu1Rwlm96jgE/+EW8a5u3unIfaDMh6qNiy/tYLR9smC4UH1Z34z6W s9skiOUfCtV1wwFIb+Y3KEdFxqN6DFpEzKSzZZ1ua/bLYPMDHyUyas1LiA98JgOUszG2 gO6JRLtlCsllkPbpVT5YMspunsZ0KfB3DL2lwQ3CS829jQDHfLJUWxGr9PH9Q1y9sqn/ nJ8/C+MwMv0pt+JMVLbjBegf4SgnV8S/ZaqykPOjijB9SyzLEAakC8SX65zkpZo6c4uL 6cA75vZeGe6roNm77zr2Hb7o5HeZV+Q1qPo0awJlqraDEUCwktYsAhlNPnaOe4l+3PN2 iCWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CZ3w5orF; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a63fe51000000b0040d5fd63025si10457809pgj.794.2022.06.26.05.20.07; Sun, 26 Jun 2022 05:20:18 -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=@nxp.com header.s=selector2 header.b=CZ3w5orF; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234441AbiFZMFu (ORCPT + 99 others); Sun, 26 Jun 2022 08:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234413AbiFZMFj (ORCPT ); Sun, 26 Jun 2022 08:05:39 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2046.outbound.protection.outlook.com [40.107.104.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ECEF13CFD; Sun, 26 Jun 2022 05:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lulTXRz5zTAUzdZOJRqXkCKIMcnrudt8F79o/h/FOaxmKx7v1qzuihALYQXg6f1j3JfF7UqDlp6O/bb3JeSd78uivJEL3kNg9YYHvtnxEvGKvRIhdKOFJ3q33x3+/xtp0emk5tAOTyJ/AtWho5OjNYFqh1yw+zUzdzT7NM/aufBjBE15wQcK+Z5s/ejixZVozoMqUpJBofvmKYtXlfYvPfJQia0xrdTHY2N42uTvuiKlzUvTuMH+c9fuml7kSirThXgFoQ5I+80Y0JntZ/3VayDxKsxg0JIPW5uPhpkI2LxQySMI96DtLDWvsQiqBTr3PS3si9xpgSfa27jkRJWYmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=u2CWzUwfTmi69rRRopT8r58PkrAYFlpdBLCv2NGY408=; b=MjuhKaUbokVcYHM8s/4DyUvN9F+sRwBN4ClQivFcN0yr33A0HGoM7dpzbVUscn7hcWbpKvRfNcX0OwpcoGwvfzkFUZ5v5IsrTaVJplIZ/Lt3yBPu9rI4IxpSGaxWtq6f+SUvhhANyl/UBVGPz2lktyPMmiR7qbVWRZ6W/kMcIW0r7ocx+V/uMSGyFnz4gNCM31SNTnqlr+tR9UqzSIlewXgB9KF60qB6mj9TPeNlXJ3vlcampFFQzfr2CFLDh3WAx+x0yEaQKJ1XqjhGdntglWmy4Zuk+i9uwXcOv4QM13uvKGXCxg6UCY4KZd/85kNgFsGKPzlZRYVkczMkUQ3I0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u2CWzUwfTmi69rRRopT8r58PkrAYFlpdBLCv2NGY408=; b=CZ3w5orFgwza7m3QWA/TJPlSGfR/2N1Habg0pjA2gxHBNl93A56HTrcR4irl+dyj6lS+PukWmQ52qoBRQ/7GsA9qpH33IfBQr0vZV6OxMQXewlYVdAiI4xun8Fq2vuFZbNFcmibLYsEuYjj4fbdymjBq7J4SD0dVx+nGNrBWxeo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by AM0PR04MB4273.eurprd04.prod.outlook.com (2603:10a6:208:67::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Sun, 26 Jun 2022 12:05:37 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::94fe:9cbe:247b:47ea]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::94fe:9cbe:247b:47ea%7]) with mapi id 15.20.5373.018; Sun, 26 Jun 2022 12:05:37 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xiaoliang Yang , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Michael Walle , Vinicius Costa Gomes , Maxim Kochetkov , Colin Foster , Richie Pearn , linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/4] net: dsa: felix: keep QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF) out of rmw Date: Sun, 26 Jun 2022 15:05:04 +0300 Message-Id: <20220626120505.2369600-4-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220626120505.2369600-1-vladimir.oltean@nxp.com> References: <20220626120505.2369600-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS9PR06CA0401.eurprd06.prod.outlook.com (2603:10a6:20b:461::11) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e638888-8b17-41cc-9419-08da576c2e2d X-MS-TrafficTypeDiagnostic: AM0PR04MB4273:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PXu7nhXmROO2jlmpYO7W62K8Xcn34La/350JdlmEcWhpSktYF6vdf1rxBXqvKIPufH3ukwNOev4GDS3AcmdLOpfxGhMmtCYosG8Z73lNUR7YJNrexVrdwio8Q/6DK9iMkAVJOCGmTzQDKPUjfa9ynZ7IGPv4GqgjeYtIrKvkN0LyoKx6qAzmmLNANiJRveFeFM+vv1SOUKLQi0KPEOdo0fmBtxDtqqf48sn6KccqNIWFbK+ROclElIoFGDTidycuKk7APkVwB3j3sDe8AMOuJmkWpas8eYSnr845dTeT9337R6zQQUfQGEWsE6YtnEECtkf7LRDvrAVa69gf5IOI3yYZl0am5z48jPhIOXagvbSpQ5CdBus+vnR8Mjx2AoUSxwoBE0tH73WOb3gYVK2gr1aE26whvYAsqx+N3YhOUNG6etIGX0/IrcIPIvl/4Ys3exo3C+OhILOnhdKp6fNy8KCHUsJkKm1ELuL4r7CpK6bxMeqbliNGwvKxJ+QscH3yZqWSPdsw6FoCe0royl9Fq4ZgODy7N8UmjXDL4r8JbjzUUToUbCxC3wubQG6+T4SVMDmPkwoGhV9rOBmy/TCzvctOqDWHq3uMiW3r7i57nAW8zU+LZG7vIp3LeGKG8cei7619cYVO64EXpk7ODgzjP0O9x1ko6IuG78jhQTFW6xVdhmjcYECAhjOXhmvudd2bjr7+HJdByCuL1Im7BL7UTUODTKXD8fDZbElJil03Y4MrC5wUQZ9yzPy1wILo5TquC3GIL89WzGXqh25AhjOAvJKorv7yxP6/2o/v3neXNN8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(136003)(39860400002)(396003)(366004)(376002)(38100700002)(316002)(83380400001)(86362001)(52116002)(2616005)(36756003)(6506007)(38350700002)(66556008)(66476007)(66946007)(4326008)(8676002)(5660300002)(8936002)(7416002)(1076003)(186003)(41300700001)(54906003)(2906002)(26005)(478600001)(6512007)(6666004)(6486002)(6916009)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5SuPhR8HpcxDBQxxZ32m+YUdHH3uExxBIYdGdKfKuxYCXrJT+4txK2FtUxHT?= =?us-ascii?Q?X/+GrWSZYmquMWiZc6GIjBHZZNr3OVOoVR0F1NyDv83kkMHXj67NVWloMHIe?= =?us-ascii?Q?jx004Hv/jYFw8XlK1vjhIWwcax74bY0cKBjZY+iRf9gSaiAnma1BL2bEhJD/?= =?us-ascii?Q?2oqgnR0TALa+VXd009VcgTIxwCQLPC/pzcPHr3du3BC9lZlE5Q26jHzPCv7s?= =?us-ascii?Q?ls5aMbB2Dz3HdeGTBOGSAhdo2XsOXBzYimiYVhIkC4a+yYPZ8ZaSoSq/Oasg?= =?us-ascii?Q?ewriR1uRsuKQPX8b6jIzTwgSCxBqHocZS5xpHHzZ8y9nCGyPc+TjSlnMokdA?= =?us-ascii?Q?Vj5x8Kx21pPcsAyUVJe9xheC/ErQb+zyOlyhPz+3TWRWi6xGsZpmR1FWcUpW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Nik9Hn6kf2rKQCuyGape8D1RzHm?= =?us-ascii?Q?zre1WYv+Qcv8gupRxn1QlfEosD996FXqoLkCh4E2gjurSAHh1lsNcc+DwAdd?= =?us-ascii?Q?YWOvDvX5Z44LXnKjffWwKsy3QjctLZOmGfpF+dYmAoGDjHDHZwGLcGkTgGFg?= =?us-ascii?Q?pi5v7gvOrDevoUHfy0lN3b18T3MMXMJiccmcoE2v24X8D5yzSoxIpRo1waS+?= =?us-ascii?Q?gD9ufLXlv2ha+eP/789dtypAp0HYIV0bmNTrNi6uFy+x7HQuEFQVGXEucPyB?= =?us-ascii?Q?lziWT9nM/wrM8fnsJUudWhvUaAHKtuX7PAtxD4xoJb47zLmJOBiBXTMovQMd?= =?us-ascii?Q?eQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e638888-8b17-41cc-9419-08da576c2e2d X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2022 12:05:37.0732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c2d+Fk/vkXcgyqRICi+/AXQdTF0KMJ1ygX8/WfM7X2l8zQyn3VOMUhzWUKuC16a4RREl72zspvnCyq1FDT8v1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4273 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 In vsc9959_tas_clock_adjust(), the INIT_GATE_STATE field is not changed, only the ENABLE field. Similarly for the disabling of the time-aware shaper in vsc9959_qos_port_tas_set(). To reflect this, keep the QSYS_TAG_CONFIG_INIT_GATE_STATE_M mask out of the read-modify-write procedure to make it clearer what is the intention of the code. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/ocelot/felix_vsc9959.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 44bbbba4d528..7573254274b3 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1204,10 +1204,7 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port, mutex_lock(&ocelot->tas_lock); if (!taprio->enable) { - ocelot_rmw_rix(ocelot, - QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF), - QSYS_TAG_CONFIG_ENABLE | - QSYS_TAG_CONFIG_INIT_GATE_STATE_M, + ocelot_rmw_rix(ocelot, 0, QSYS_TAG_CONFIG_ENABLE, QSYS_TAG_CONFIG, port); taprio_offload_free(ocelot_port->taprio); @@ -1315,10 +1312,8 @@ static void vsc9959_tas_clock_adjust(struct ocelot *ocelot) QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM_M, QSYS_TAS_PARAM_CFG_CTRL); - ocelot_rmw_rix(ocelot, - QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF), - QSYS_TAG_CONFIG_ENABLE | - QSYS_TAG_CONFIG_INIT_GATE_STATE_M, + /* Disable time-aware shaper */ + ocelot_rmw_rix(ocelot, 0, QSYS_TAG_CONFIG_ENABLE, QSYS_TAG_CONFIG, port); vsc9959_new_base_time(ocelot, taprio->base_time, @@ -1337,11 +1332,9 @@ static void vsc9959_tas_clock_adjust(struct ocelot *ocelot) QSYS_TAS_PARAM_CFG_CTRL_CONFIG_CHANGE, QSYS_TAS_PARAM_CFG_CTRL); - ocelot_rmw_rix(ocelot, - QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF) | + /* Re-enable time-aware shaper */ + ocelot_rmw_rix(ocelot, QSYS_TAG_CONFIG_ENABLE, QSYS_TAG_CONFIG_ENABLE, - QSYS_TAG_CONFIG_ENABLE | - QSYS_TAG_CONFIG_INIT_GATE_STATE_M, QSYS_TAG_CONFIG, port); } mutex_unlock(&ocelot->tas_lock); -- 2.25.1