aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/ksz_common.h
diff options
context:
space:
mode:
authorTristram Ha <[email protected]>2024-12-18 02:03:11 +0000
committerJakub Kicinski <[email protected]>2024-12-20 02:05:57 +0000
commit3fc87cb94f5f3224a9ea168ee935286d915d2a6a (patch)
treeeead55351b00e4f6612e437ed430267a80e87d46 /drivers/net/dsa/microchip/ksz_common.h
parentMerge branch 'bnxt_en-driver-update' (diff)
downloadkernel-3fc87cb94f5f3224a9ea168ee935286d915d2a6a.tar.gz
kernel-3fc87cb94f5f3224a9ea168ee935286d915d2a6a.zip
net: dsa: microchip: Add suspend/resume support to KSZ DSA driver
The KSZ DSA driver starts a timer to read MIB counters periodically to avoid count overrun. During system suspend this will give an error for not able to write to register as the SPI system returns an error when it is in suspend state. This implementation stops the timer when the system goes into suspend and restarts it when resumed. Signed-off-by: Tristram Ha <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r--drivers/net/dsa/microchip/ksz_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index b3bb75ca0796..2bc96127a447 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -444,6 +444,8 @@ struct ksz_dev_ops {
struct ksz_device *ksz_switch_alloc(struct device *base, void *priv);
int ksz_switch_register(struct ksz_device *dev);
void ksz_switch_remove(struct ksz_device *dev);
+int ksz_switch_suspend(struct device *dev);
+int ksz_switch_resume(struct device *dev);
void ksz_init_mib_timer(struct ksz_device *dev);
bool ksz_is_port_mac_global_usable(struct dsa_switch *ds, int port);