mirror of
https://github.com/VIKINGYFY/immortalwrt.git
synced 2025-12-16 09:10:38 +00:00
These patches have been accepted for linux v6.18. e57723fe536f net: dsa: b53: properly bound ARL searches for < 4 ARL bin chips 674b34c4c770 net: dsa: b53: fix ageing time for BCM53101 89eb9a62aed7 net: dsa: b53: fix reserved register access in b53_fdb_dump() 61730ac10ba9 net: dsa: b53: mmap: Implement bcm63268 gphy power control 7f95f04fe190 net: dsa: b53: mmap: Add gphy port to phy info for bcm63268 5ac00023852d net: dsa: b53: mmap: Implement bcm63xx ephy power control e8e13073dff7 net: dsa: b53: mmap: Add register layout for bcm6368 c251304ab021 net: dsa: b53: mmap: Add register layout for bcm6318 aed2aaa3c963 net: dsa: b53: mmap: Add syscon reference and register layout for bcm63268 fcf02a462fab net: dsa: b53: Define chip IDs for more bcm63xx SoCs be7a79145d85 net: dsa: b53: Add phy_enable(), phy_disable() methods 762e7e174da9 net: dsa: tag_brcm: do not mark link local traffic as offloaded Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
From be7a79145d85af1a9d65a45560b9243b13a67782 Mon Sep 17 00:00:00 2001
|
|
From: Kyle Hendry <kylehendrydev@gmail.com>
|
|
Date: Wed, 23 Jul 2025 20:52:40 -0700
|
|
Subject: [PATCH] net: dsa: b53: Add phy_enable(), phy_disable() methods
|
|
|
|
Add phy enable/disable to b53 ops to be called when
|
|
enabling/disabling ports.
|
|
|
|
Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
|
|
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
|
Link: https://patch.msgid.link/20250724035300.20497-2-kylehendrydev@gmail.com
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/dsa/b53/b53_common.c | 6 ++++++
|
|
drivers/net/dsa/b53/b53_priv.h | 2 ++
|
|
2 files changed, 8 insertions(+)
|
|
|
|
--- a/drivers/net/dsa/b53/b53_common.c
|
|
+++ b/drivers/net/dsa/b53/b53_common.c
|
|
@@ -689,6 +689,9 @@ int b53_enable_port(struct dsa_switch *d
|
|
|
|
cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
|
|
|
|
+ if (dev->ops->phy_enable)
|
|
+ dev->ops->phy_enable(dev, port);
|
|
+
|
|
if (dev->ops->irq_enable)
|
|
ret = dev->ops->irq_enable(dev, port);
|
|
if (ret)
|
|
@@ -727,6 +730,9 @@ void b53_disable_port(struct dsa_switch
|
|
reg |= PORT_CTRL_RX_DISABLE | PORT_CTRL_TX_DISABLE;
|
|
b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), reg);
|
|
|
|
+ if (dev->ops->phy_disable)
|
|
+ dev->ops->phy_disable(dev, port);
|
|
+
|
|
if (dev->ops->irq_disable)
|
|
dev->ops->irq_disable(dev, port);
|
|
}
|
|
--- a/drivers/net/dsa/b53/b53_priv.h
|
|
+++ b/drivers/net/dsa/b53/b53_priv.h
|
|
@@ -45,6 +45,8 @@ struct b53_io_ops {
|
|
int (*phy_write16)(struct b53_device *dev, int addr, int reg, u16 value);
|
|
int (*irq_enable)(struct b53_device *dev, int port);
|
|
void (*irq_disable)(struct b53_device *dev, int port);
|
|
+ void (*phy_enable)(struct b53_device *dev, int port);
|
|
+ void (*phy_disable)(struct b53_device *dev, int port);
|
|
void (*phylink_get_caps)(struct b53_device *dev, int port,
|
|
struct phylink_config *config);
|
|
struct phylink_pcs *(*phylink_mac_select_pcs)(struct b53_device *dev,
|