Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6705589rwb; Tue, 15 Nov 2022 02:30:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf6IlHwxavptlgBNM8y7pNlavzSdWaLz3rb4SekBgg9uVAdClDy+xpgHlKt0vz8AG5Vq3Y63 X-Received: by 2002:a05:6402:1856:b0:461:dc29:275b with SMTP id v22-20020a056402185600b00461dc29275bmr14540267edy.108.1668508232168; Tue, 15 Nov 2022 02:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668508232; cv=none; d=google.com; s=arc-20160816; b=jIewPcRxAtwwnybjwZB01ioOhmEtoGaVpzA9LO2FPH6vquTtI0q1FGaS5+cMSleN3c oGofqFwU0aAnFoN0/Zqo1We7rdNp4rcJs1lnGoJudpNsy0ZeSh8WqEtntXXwRbZxTJa1 0B6pO4qoZUO0X9gzMgOUtL8D5ZHXtjV8ks7785xsuV4u67w2pxOo/oIBP/PNzImSL8cZ o11nYUvPsetHK6Q9f/OcUTxeRNcpZm8Lsde2mj9yG12IfOumGmZRdUxy0QECQu5Z6aX0 s7/29Ywo8bttEpEXqKfLVOu8iz0iNN08GYwRfmsUupwSyGuqlDOHA8T7HHpzLlbrhry6 AObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=3tijywnIt8DjqXlqSE+d/pZazgCQTAqlPz3s4yOaOPk=; b=QNTLsQqCN5z3LMeZ3a1XHsWG9JqAhf++E/EDMEumxoS1nA3CAGNQfaYta+npxB2Lqd LGxGl8Sxug/DktLJStskvCT7tYFW9xZBWfGCGCw7M6WfqHA/9/5XE8/BFkOLxv9gfLSK VG9wFw7WGrrlX/NmsIArN+nuwLZ0uYo7RqMcUlBzfbxaOEVkgW22BsbHrFUcYXTVtyD6 NLky44E7mlzhO+DacVVuFLzns+RPLfGtWwGpY6I/ICsFjzzl+WOMiHcQ21VPhHPRmN6K opqx+ND3zQslyDbCkf8+Pb759stH5E75FBogdQlyvtvJo3Y9vS66PK/URC6ymDKPdMIN m5GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=IBtUw+9G; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o22-20020a170906975600b007ae8b1704b9si11879492ejy.406.2022.11.15.02.30.10; Tue, 15 Nov 2022 02:30:32 -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=@messagingengine.com header.s=fm1 header.b=IBtUw+9G; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238149AbiKOJ6l (ORCPT + 88 others); Tue, 15 Nov 2022 04:58:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237821AbiKOJ6i (ORCPT ); Tue, 15 Nov 2022 04:58:38 -0500 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF56D13EB8; Tue, 15 Nov 2022 01:58:36 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 07FA45C0144; Tue, 15 Nov 2022 04:58:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 15 Nov 2022 04:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1668506316; x=1668592716; bh=3tijywnIt8DjqXlqSE+d/pZazgCQ TAqlPz3s4yOaOPk=; b=IBtUw+9GW+uYbVFd9CAmT6T8jEh3xrxTTwDJ5uDZExQT t+NBPoPdOlQOgxrSwcBuIkYprlhTmxPr2pshmxw2FQXR+sqK/6qdHI95tF/9KekF E8q285I6jUjhkIRkN0xTKJkzgf+Jev2jHEesr2+z2WA9YxSvB+en7ZFXImNrK797 ihJDBwTCFovKWPuqYVwW6IjrLmO1zlhprQ1YfpHCSMFQ76FxnJzG+zW3eOlfr4Kd x6HQ9KJoSrCFDJJO07Zee2k4kr29m/YG4I3btUB8BuQo5OB655qkI4qA71LharJr ayMiYOZxIfzPwyFzccRP6bv0O8oBKWuj1AthDhrizQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgeeggddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedvudefveekheeugeeftddvveefgfduieefudeifefgleekheegleegjeejgeeg hfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiug hoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Nov 2022 04:58:34 -0500 (EST) Date: Tue, 15 Nov 2022 11:58:30 +0200 From: Ido Schimmel To: "Hans J. Schultz" Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Paolo Abeni , open list Subject: Re: [PATCH v8 net-next 2/2] net: dsa: mv88e6xxx: mac-auth/MAB implementation Message-ID: References: <20221112203748.68995-1-netdev@kapio-technology.com> <20221112203748.68995-3-netdev@kapio-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221112203748.68995-3-netdev@kapio-technology.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,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 On Sat, Nov 12, 2022 at 09:37:48PM +0100, Hans J. Schultz wrote: > diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c > index 8a874b6fc8e1..0a57f4e7dd46 100644 > --- a/drivers/net/dsa/mv88e6xxx/global1_atu.c > +++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c > @@ -12,6 +12,7 @@ > > #include "chip.h" > #include "global1.h" > +#include "switchdev.h" > > /* Offset 0x01: ATU FID Register */ > > @@ -426,6 +427,8 @@ static irqreturn_t mv88e6xxx_g1_atu_prob_irq_thread_fn(int irq, void *dev_id) > if (err) > goto out; > > + mv88e6xxx_reg_unlock(chip); Why? At minimum such a change needs to be explained in the commit message and probably split to a separate preparatory patch, assuming the change is actually required. > + > spid = entry.state; > > if (val & MV88E6XXX_G1_ATU_OP_AGE_OUT_VIOLATION) { > @@ -446,6 +449,12 @@ static irqreturn_t mv88e6xxx_g1_atu_prob_irq_thread_fn(int irq, void *dev_id) > "ATU miss violation for %pM portvec %x spid %d\n", > entry.mac, entry.portvec, spid); > chip->ports[spid].atu_miss_violation++; > + > + if (fid && chip->ports[spid].mab) > + err = mv88e6xxx_handle_violation(chip, spid, &entry, > + fid, MV88E6XXX_G1_ATU_OP_MISS_VIOLATION); > + if (err) > + goto out; On error the kernel will try to unlock a mutex that is already unlocked. > } > > if (val & MV88E6XXX_G1_ATU_OP_FULL_VIOLATION) { > @@ -454,7 +463,6 @@ static irqreturn_t mv88e6xxx_g1_atu_prob_irq_thread_fn(int irq, void *dev_id) > entry.mac, entry.portvec, spid); > chip->ports[spid].atu_full_violation++; > } > - mv88e6xxx_reg_unlock(chip); > > return IRQ_HANDLED;