提交 4d88c339 编写于 作者: S Sudarsana Reddy Kalluru 提交者: David S. Miller

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: 57f780f1 ("atlantic: Fix driver resume flow.")
Signed-off-by: NSudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fdbccea4
...@@ -413,13 +413,13 @@ static int atl_resume_common(struct device *dev, bool deep) ...@@ -413,13 +413,13 @@ static int atl_resume_common(struct device *dev, bool deep)
if (deep) { if (deep) {
/* Reinitialize Nic/Vecs objects */ /* Reinitialize Nic/Vecs objects */
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol); aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
}
if (netif_running(nic->ndev)) {
ret = aq_nic_init(nic); ret = aq_nic_init(nic);
if (ret) if (ret)
goto err_exit; goto err_exit;
}
if (netif_running(nic->ndev)) {
ret = aq_nic_start(nic); ret = aq_nic_start(nic);
if (ret) if (ret)
goto err_exit; goto err_exit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册