From: Ido Schimmel <idosch@idosch.org>
To: "Hans J. Schultz" <netdev@kapio-technology.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 net-next 2/2] net: dsa: mv88e6xxx: mac-auth/MAB implementation
Date: Tue, 15 Nov 2022 11:58:30 +0200 [thread overview]
Message-ID: <Y3NixroyU4XGL5j6@shredder> (raw)
In-Reply-To: <20221112203748.68995-3-netdev@kapio-technology.com>
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;
next prev parent reply other threads:[~2022-11-15 9:58 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 20:37 [PATCH v8 net-next 0/2] mv88e6xxx: Add MAB offload support Hans J. Schultz
2022-11-12 20:37 ` [PATCH v8 net-next 1/2] net: dsa: mv88e6xxx: allow reading FID when handling ATU violations Hans J. Schultz
2022-11-12 20:37 ` [PATCH v8 net-next 2/2] net: dsa: mv88e6xxx: mac-auth/MAB implementation Hans J. Schultz
2022-11-15 9:58 ` Ido Schimmel [this message]
2022-11-15 10:36 ` netdev
2022-11-15 15:12 ` Ido Schimmel
2022-11-15 15:24 ` netdev
2022-11-15 22:23 ` Vladimir Oltean
2022-11-20 9:33 ` netdev
2022-11-20 9:54 ` netdev
2022-11-20 10:21 ` netdev
2022-11-20 15:00 ` Vladimir Oltean
2022-12-02 11:06 ` netdev
2022-12-04 15:08 ` netdev
2022-12-04 13:26 ` netdev
2022-11-15 2:57 ` [PATCH v8 net-next 0/2] mv88e6xxx: Add MAB offload support Jakub Kicinski
2022-11-15 5:18 ` Jakub Kicinski
2022-11-15 9:30 ` Ido Schimmel
2022-11-15 10:26 ` netdev
2022-11-15 10:28 ` Vladimir Oltean
2022-11-15 10:52 ` netdev
2022-11-15 11:10 ` Vladimir Oltean
2022-11-15 11:31 ` netdev
2022-11-15 12:22 ` Vladimir Oltean
2022-11-15 12:40 ` netdev
2022-11-15 13:25 ` netdev
2022-11-15 14:56 ` Vladimir Oltean
2022-11-15 15:14 ` netdev
2022-11-15 16:15 ` Vladimir Oltean
2022-11-15 17:11 ` netdev
2022-11-15 17:15 ` Vladimir Oltean
2022-11-15 16:03 ` netdev
2022-11-15 16:18 ` Vladimir Oltean
2022-11-15 18:40 ` netdev
2022-11-16 10:24 ` Vladimir Oltean
2022-11-16 13:37 ` Andrew Lunn
2022-11-18 13:37 ` netdev
2022-11-18 13:51 ` Andrew Lunn
2022-11-15 13:21 ` Andrew Lunn
2022-11-15 14:18 ` netdev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3NixroyU4XGL5j6@shredder \
--to=idosch@idosch.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@kapio-technology.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).