Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Richard Cochran <richardcochran@gmail.com>,
Kamil Alkhouri <kamil.alkhouri@hs-offenburg.de>,
ilias.apalodimas@linaro.org
Subject: Re: [PATCH v4 2/7] net: dsa: Add DSA driver for Hirschmann Hellcreek switches
Date: Tue, 1 Sep 2020 17:22:43 +0300 [thread overview]
Message-ID: <20200901142243.2jrurmfmh6znosxd@skbuf> (raw)
In-Reply-To: <87y2ltegnd.fsf@kurt>
On Tue, Sep 01, 2020 at 04:05:42PM +0200, Kurt Kanzenbach wrote:
> Hi Vladimir,
>
> On Tue Sep 01 2020, Vladimir Oltean wrote:
> > Hi Kurt,
> >
> > On Tue, Sep 01, 2020 at 02:50:09PM +0200, Kurt Kanzenbach wrote:
> [snip]
> >> +struct hellcreek {
> >> + const struct hellcreek_platform_data *pdata;
> >> + struct device *dev;
> >> + struct dsa_switch *ds;
> >> + struct hellcreek_port *ports;
> >> + struct mutex reg_lock; /* Switch IP register lock */
> >
> > Pardon me asking, but I went back through the previous review comments
> > and I didn't see this being asked.
>
> It was asked multiple times, why there was a spinlock without interrupts
> being registered (see e.g. [1], [2]). I've used the spinlock variant,
> because the previously used hrtimers act like interrupts. As there are
> no timers anymore, there's no need for spinlocks and mutexes can be
> used.
>
That, yes, I remember, but not why the reg_lock exists in the first
place.
> Florian Fainelli also asked if the reg lock can be removed
> completely. See below.
>
Missed your answer on that.
> >
> > What is the register lock protecting against, exactly?
>
> A lot of the register operations work by:
>
> * Select port, priority, vlan or counter
> * Configure it
>
> These sequences have to be atomic. That's what I wanted to ensure.
>
So, let me rephrase. Is there any code path that is broken, even if only
theoretically, if you remove the reg_lock?
> Thanks,
> Kurt
>
> [1] - https://lkml.kernel.org/netdev/def49ff6-72fe-7ca0-9e00-863c314c1c3d@gmail.com/
> [2] - https://lkml.kernel.org/netdev/20200624130318.GD7247@localhost/
Thanks,
-Vladimir
next prev parent reply other threads:[~2020-09-01 14:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 12:50 [PATCH v4 0/7] Hirschmann Hellcreek DSA driver Kurt Kanzenbach
2020-09-01 12:50 ` [PATCH v4 1/7] net: dsa: Add tag handling for Hirschmann Hellcreek switches Kurt Kanzenbach
2020-09-01 12:50 ` [PATCH v4 2/7] net: dsa: Add DSA driver " Kurt Kanzenbach
2020-09-01 13:40 ` Vladimir Oltean
2020-09-01 14:05 ` Kurt Kanzenbach
2020-09-01 14:22 ` Vladimir Oltean [this message]
2020-09-01 15:59 ` Andrew Lunn
2020-09-01 16:36 ` Richard Cochran
2020-09-01 18:53 ` David Miller
2020-09-02 5:59 ` Kurt Kanzenbach
2020-09-01 15:11 ` kernel test robot
2020-09-01 12:50 ` [PATCH v4 3/7] net: dsa: hellcreek: Add PTP clock support Kurt Kanzenbach
2020-09-01 12:50 ` [PATCH v4 4/7] net: dsa: hellcreek: Add support for hardware timestamping Kurt Kanzenbach
2020-09-01 12:50 ` [PATCH v4 5/7] net: dsa: hellcreek: Add PTP status LEDs Kurt Kanzenbach
2020-09-03 16:32 ` Florian Fainelli
2020-09-01 12:50 ` [PATCH v4 6/7] dt-bindings: Add vendor prefix for Hirschmann Kurt Kanzenbach
2020-09-01 12:50 ` [PATCH v4 7/7] dt-bindings: net: dsa: Add documentation for Hellcreek switches Kurt Kanzenbach
2020-09-03 16:27 ` Rob Herring
2020-09-03 16:29 ` Florian Fainelli
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=20200901142243.2jrurmfmh6znosxd@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kamil.alkhouri@hs-offenburg.de \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@gmail.com \
--subject='Re: [PATCH v4 2/7] net: dsa: Add DSA driver for Hirschmann Hellcreek switches' \
/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
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).