From a6700dbb48940e1e872f4aa5cadffd9ce80b6cb3 Mon Sep 17 00:00:00 2001 From: celtare21 Date: Mon, 6 Jun 2022 17:53:11 +0100 Subject: [PATCH] rmnet_ipa: Fix netdev watchdog triggering on suspend Sometimes remnet_ipa fails to suspend with the following trace: NETDEV WATCHDOG: rmnet_ipa0 (): transmit queue 0 timed out Signed-off-by: celtare21 --- drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c index a0284deed24f..567fa55339c2 100644 --- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c @@ -2652,6 +2652,7 @@ static int rmnet_ipa_ap_suspend(struct device *dev) /* Make sure that there is no Tx operation ongoing */ netif_stop_queue(netdev); + netif_device_detach(netdev); spin_unlock_irqrestore(&wwan_ptr->lock, flags); IPAWANDBG("De-activating the PM resource.\n"); @@ -2681,6 +2682,7 @@ static int rmnet_ipa_ap_resume(struct device *dev) atomic_set(&rmnet_ipa3_ctx->ap_suspend, 0); if (netdev) netif_wake_queue(netdev); + netif_device_attach(netdev); IPAWANDBG("Exit\n"); return 0;