3b05c799 | 03-Jul-2024 |
Javier Carrasco <javier.carrasco.cruz@gmail.com> |
net: dsa: ar9331: constify struct regmap_bus
`ar9331_sw_bus` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cr
net: dsa: ar9331: constify struct regmap_bus
`ar9331_sw_bus` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/20240703-net-const-regmap-v1-4-ff4aeceda02c@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
422b6402 | 20-Jun-2024 |
Matthias Schiffer <mschiffer@universe-factory.net> |
net: dsa: qca8k: add support for bridge port isolation
Remove a pair of ports from the port matrix when both ports have the isolated flag set.
Signed-off-by: Matthias Schiffer <mschiffer@universe-f
net: dsa: qca8k: add support for bridge port isolation
Remove a pair of ports from the port matrix when both ports have the isolated flag set.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
412e1775 | 20-Jun-2024 |
Matthias Schiffer <mschiffer@universe-factory.net> |
net: dsa: qca8k: factor out bridge join/leave logic
Most of the logic in qca8k_port_bridge_join() and qca8k_port_bridge_leave() is the same. Refactor to reduce duplication and prepare for reusing th
net: dsa: qca8k: factor out bridge join/leave logic
Most of the logic in qca8k_port_bridge_join() and qca8k_port_bridge_leave() is the same. Refactor to reduce duplication and prepare for reusing the code for implementing bridge port isolation.
dsa_port_offloads_bridge_dev() is used instead of dsa_port_offloads_bridge(), passing the bridge in as a struct netdevice *, as we won't have a struct dsa_bridge in qca8k_port_bridge_flags().
The error handling is changed slightly in the bridge leave case, returning early and emitting an error message when a regmap access fails. This shouldn't matter in practice, as there isn't much we can do if communication with the switch breaks down in the middle of reconfiguration.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
636d022c | 12-Apr-2024 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: dsa: qca8k: provide own phylink MAC operations
Convert qca8k to provide its own phylink MAC operations, thus avoiding the shim layer in DSA's port.c.
Signed-off-by: Russell King (Oracle) <rmk+
net: dsa: qca8k: provide own phylink MAC operations
Convert qca8k to provide its own phylink MAC operations, thus avoiding the shim layer in DSA's port.c.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/E1rvIce-006bQi-58@rmk-PC.armlinux.org.uk Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
709776ea | 02-Feb-2024 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: qca8k: consistently use "ret" rather than "err" for error codes
It was pointed out during the review [1] of commit 68e1010cda79 ("net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_regist
net: dsa: qca8k: consistently use "ret" rather than "err" for error codes
It was pointed out during the review [1] of commit 68e1010cda79 ("net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure") that the rest of the qca8k driver uses "int ret" rather than "int err".
Make everything consistent in that regard, not only qca8k_mdio_register(), but also qca8k_setup_mdio_bus().
[1] https://lore.kernel.org/netdev/qyl2w3ownx5q7363kqxib52j5htar4y6pkn7gen27rj45xr4on@pvy5agi6o2te/
Suggested-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
c4a1cefd | 04-Jan-2024 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: qca8k: use "dev" consistently within qca8k_mdio_register()
Accessed either through priv->dev or ds->dev, it is the same device structure. Keep a single variable which holds a reference to
net: dsa: qca8k: use "dev" consistently within qca8k_mdio_register()
Accessed either through priv->dev or ds->dev, it is the same device structure. Keep a single variable which holds a reference to it, and use it consistently.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
5c5d6b34 | 04-Jan-2024 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register()
__of_mdiobus_register() already calls __mdiobus_register() if the OF node provided as argument is NULL. We can take advantag
net: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register()
__of_mdiobus_register() already calls __mdiobus_register() if the OF node provided as argument is NULL. We can take advantage of that and simplify the 2 code path, calling devm_of_mdiobus_register() only once for both cases.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
525366b8 | 04-Jan-2024 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case
To simplify reasoning about why the DSA framework provides the ds->user_mii_bus functionality, drivers should only use it if they ne
net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case
To simplify reasoning about why the DSA framework provides the ds->user_mii_bus functionality, drivers should only use it if they need to. The qca8k driver appears to also use it simply as storage for a pointer, which is not a good enough reason to make the core much more difficult to follow.
ds->user_mii_bus is useful for only 2 cases:
1. The driver probes on platform_data (no OF) 2. The driver probes on OF, but there is no OF node for the MDIO bus.
It is unclear if case (1) is supported with qca8k. It might not be: the driver might crash when of_device_get_match_data() returns NULL and then it dereferences priv->info without NULL checking.
Anyway, let us limit the ds->user_mii_bus usage only to the above cases, and not assign it when an OF node is present.
The bus->phy_mask assignment follows along with the movement, because __of_mdiobus_register() overwrites this bus field anyway. The value set by the driver only matters for the non-OF code path.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
e66bf63a | 04-Jan-2024 |
Vladimir Oltean <vladimir.oltean@nxp.com> |
net: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled"
Currently the driver calls the non-OF devm_mdiobus_register() rather than devm_of_mdiobus_register() for this case, but
net: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled"
Currently the driver calls the non-OF devm_mdiobus_register() rather than devm_of_mdiobus_register() for this case, but it seems to rather be a confusing coincidence, and not a real use case that needs to be supported.
If the device tree says status = "disabled" for the MDIO bus, we shouldn't need an MDIO bus at all. Instead, just exit as early as possible and do not call any MDIO API.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|