Skip to content

Commit

Permalink
atlantic: Fix driver resume flow.
Browse files Browse the repository at this point in the history
[ Upstream commit 57f780f ]

Driver crashes when restoring from the Hibernate. In the resume flow,
driver need to clean up the older nic/vec objects and re-initialize them.

Fixes: 8aaa112 ("net: atlantic: refactoring pm logic")
Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Sudarsana Reddy Kalluru authored and gregkh committed Sep 15, 2021
1 parent cb996dc commit 26fae72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
Expand Up @@ -417,6 +417,9 @@ static int atl_resume_common(struct device *dev, bool deep)
pci_restore_state(pdev);

if (deep) {
/* Reinitialize Nic/Vecs objects */
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);

ret = aq_nic_init(nic);
if (ret)
goto err_exit;
Expand Down

0 comments on commit 26fae72

Please sign in to comment.