atlantic: Fix issue in the pm resume flow.
authorSudarsana Reddy Kalluru <skalluru@marvell.com>
Thu, 23 Sep 2021 10:16:05 +0000 (03:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Sep 2021 08:11:03 +0000 (10:11 +0200)
commit0032f8b3cf2a740ded49efbd649c8c2b956beed7
tree59098ecc2c58243d00c5c074561e8412af39556c
parentc2598bce4152516c329934e1bfc192ce0df01a75
atlantic: Fix issue in the pm resume flow.

[ Upstream commit 4d88c339c423eefe2fd48215016cb0c75fcb4c4d ]

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.")
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>
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c