[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3csnad2Ote5JeRAdTwToZNa-2+DGwUs62sobU-ESWmbQ@mail.gmail.com>
Date: Thu, 5 Aug 2021 14:05:11 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Vladimir Oltean <olteanv@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Oleksij Rempel <linux@...pel-privat.de>,
Yangbo Lu <yangbo.lu@....com>,
Networking <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] dsa: sja1105: fix reverse dependency
On Thu, Aug 5, 2021 at 1:49 PM Vladimir Oltean <olteanv@...il.com> wrote:
>
> On Thu, Aug 05, 2021 at 01:39:34PM +0200, Arnd Bergmann wrote:
> > Do you have any opinion on whether that 'select' going the other way is still
> > relevant?
>
> Yes, of course it is. It also has nothing to do with build dependencies.
> With the original DSA design from 2008, an Ethernet switch has separate
> drivers for
> (a) accessing its registers
> (b) manipulating the packets that the switch sends towards a host
> Ethernet controller ("DSA master")
>
> The register access drivers are in drivers/net/dsa/*, the packet
> manipulation ("tagging protocol") drivers are in net/dsa/tag_*.c.
>
> [ This is because it was originally thought that a "tagging protocol" is
> completely stateless and you should never need to access a hardware
> register when manipulating a packet. ]
>
> When you enable a driver for a switch, you absolutely want to ping
> through it too, so all register access drivers enable the tagging
> protocol driver specific to their hardware as well, using 'select'.
> This works just fine because tagging protocol drivers generally have no
> dependencies, or if they do, the register access driver inherits them too.
> So a user does not need to manually enable the tagging protocol driver.
Got it, thanks for the explanation.
Arnd
Powered by blists - more mailing lists