Skip to contentSkip to conversation

atlantic: Fix issue in the pm resume flow.

PATCH Applied Sudarsana Reddy Kalluru 2 participants 2 messages Sep 23, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atlantic: Fix issue in the pm resume flow.

After fixing hibernation resume flow, another usecase was found which should be explicitly handled - resume when device is in "down" state. Invoke aq_nic_init jointly with aq_nic_start only if ndev was already up during suspend/hibernate. We still need to perform nic_deinit() if caller requests for it, to handle the freeze/resume scenarios.

Fixes 57f780f1c433 ("atlantic: Fix driver resume flow.")
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +2 -2
index dee9ff74d6d6..d4b1976ee69b 100644
@@ -413,13 +413,13 @@ static int atl_resume_common(struct device *dev, bool deep)
 	if (deep) {
 		/* Reinitialize Nic/Vecs objects */
 		aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
+	}
 
+	if (netif_running(nic->ndev)) {
 		ret = aq_nic_init(nic);
 		if (ret)
 			goto err_exit;
-	}
 
-	if (netif_running(nic->ndev)) {
 		ret = aq_nic_start(nic);
 		if (ret)
 			goto err_exit;
Signature · 1 line
2.27.0
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 11 lines · On Thu, 23 Sep 2021 03:16:05 -0700 you wrote:

After fixing hibernation resume flow, another usecase was found which should be explicitly handled - resume when device is in "down" state. Invoke aq_nic_init jointly with aq_nic_start only if ndev was already up during suspend/hibernate. We still need to perform nic_deinit() if caller requests for it, to handle the freeze/resume scenarios.

Fixes 57f780f1c433 ("atlantic: Fix driver resume flow.")

[...]

Here is the summary with links:
- [net,1/1] atlantic: Fix issue in the pm resume flow.

    https://git.kernel.org/netdev/net/c/4d88c339c423

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html