From 82249219bbcd68c6ac4355bc1825c645280b4f1a Mon Sep 17 00:00:00 2001 From: Jan Sondhauss Date: Tue, 8 Jul 2025 09:21:12 +0200 Subject: [PATCH] net: dsa: microchip: ksz8: on exit hold switch in reset When the switch is probed, the last step is to register with the dsa subsystem. However, the dsa subsystem might not be initialized yet and will return EPROBE_DEFER. That also means the probing of the switch has to be deferred. Because the ksz8863 switches by default and we have to guarantee that we can keep both ports seperated, the switch must be put back into reset. Signed-off-by: Jan Sondhauss --- drivers/net/dsa/microchip/ksz8795.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index 206587d5fbff..deda177749ab 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -1487,6 +1487,8 @@ int ksz8_switch_init(struct ksz_device *dev) void ksz8_switch_exit(struct ksz_device *dev) { ksz8_reset_switch(dev); + if (dev->reset_gpio) + gpiod_set_value_cansleep(dev->reset_gpio, 1); } MODULE_AUTHOR("Tristram Ha ");