[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210805114946.n46mumz2re7fxdto@skbuf>
Date: Thu, 5 Aug 2021 14:49:46 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Arnd Bergmann <arnd@...nel.org>
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 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.
Powered by blists - more mailing lists