[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250306065921.2329517-1-haibo.chen@nxp.com>
Date: Thu, 6 Mar 2025 14:59:20 +0800
From: haibo.chen@....com
To: mkl@...gutronix.de,
mailhol.vincent@...adoo.fr
Cc: haibo.chen@....com,
ciprianmarian.costea@....nxp.com,
han.xu@....com,
u.kleine-koenig@...libre.com,
linux-can@...r.kernel.org,
linux-kernel@...r.kernel.org,
imx@...ts.linux.dev
Subject: [PATCH 1/2] can: flexcan: only set CAN_STATE_ERROR_ACTIVE when resume has no issue
From: Haibo Chen <haibo.chen@....com>
Only set CAN state to CAN_STATE_ERROR_ACTIVE when resume process has
no issue, otherwise keep in CAN_STATE_SLEEPING as suspend did.
Signed-off-by: Haibo Chen <haibo.chen@....com>
---
drivers/net/can/flexcan/flexcan-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
index b347a1c93536..8415ef71f1b1 100644
--- a/drivers/net/can/flexcan/flexcan-core.c
+++ b/drivers/net/can/flexcan/flexcan-core.c
@@ -2311,7 +2311,6 @@ static int __maybe_unused flexcan_resume(struct device *device)
struct flexcan_priv *priv = netdev_priv(dev);
int err;
- priv->can.state = CAN_STATE_ERROR_ACTIVE;
if (netif_running(dev)) {
netif_device_attach(dev);
netif_start_queue(dev);
@@ -2332,6 +2331,7 @@ static int __maybe_unused flexcan_resume(struct device *device)
flexcan_chip_interrupts_enable(dev);
}
}
+ priv->can.state = CAN_STATE_ERROR_ACTIVE;
return 0;
}
--
2.34.1
Powered by blists - more mailing lists