Skip to content

Commit 4d88c33

Browse files
Sudarsana Reddy Kallurudavem330
authored andcommitted
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: 57f780f ("atlantic: Fix driver resume flow.") Signed-off-by: Sudarsana Reddy Kalluru <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fdbccea commit 4d88c33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,13 @@ static int atl_resume_common(struct device *dev, bool deep)
413413
if (deep) {
414414
/* Reinitialize Nic/Vecs objects */
415415
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
416+
}
416417

418+
if (netif_running(nic->ndev)) {
417419
ret = aq_nic_init(nic);
418420
if (ret)
419421
goto err_exit;
420-
}
421422

422-
if (netif_running(nic->ndev)) {
423423
ret = aq_nic_start(nic);
424424
if (ret)
425425
goto err_exit;

0 commit comments

Comments
 (0)