Skip to content

Commit 0f33250

Browse files
acelanPaolo Abeni
authored andcommitted
net: atlantic: remove deep parameter on suspend/resume functions
Below commit claims that atlantic NIC requires to reset the device on pm op, and had set the deep to true for all suspend/resume functions. commit 1809c30 ("net: atlantic: always deep reset on pm op, fixing up my null deref regression") So, we could remove deep parameter on suspend/resume functions without any functional change. Fixes: 1809c30 ("net: atlantic: always deep reset on pm op, fixing up my null deref regression") Signed-off-by: Chia-Lin Kao (AceLan) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent ada74c5 commit 0f33250

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static void aq_pci_shutdown(struct pci_dev *pdev)
379379
}
380380
}
381381

382-
static int aq_suspend_common(struct device *dev, bool deep)
382+
static int aq_suspend_common(struct device *dev)
383383
{
384384
struct aq_nic_s *nic = pci_get_drvdata(to_pci_dev(dev));
385385

@@ -392,17 +392,15 @@ static int aq_suspend_common(struct device *dev, bool deep)
392392
if (netif_running(nic->ndev))
393393
aq_nic_stop(nic);
394394

395-
if (deep) {
396-
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
397-
aq_nic_set_power(nic);
398-
}
395+
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
396+
aq_nic_set_power(nic);
399397

400398
rtnl_unlock();
401399

402400
return 0;
403401
}
404402

405-
static int atl_resume_common(struct device *dev, bool deep)
403+
static int atl_resume_common(struct device *dev)
406404
{
407405
struct pci_dev *pdev = to_pci_dev(dev);
408406
struct aq_nic_s *nic;
@@ -415,10 +413,8 @@ static int atl_resume_common(struct device *dev, bool deep)
415413
pci_set_power_state(pdev, PCI_D0);
416414
pci_restore_state(pdev);
417415

418-
if (deep) {
419-
/* Reinitialize Nic/Vecs objects */
420-
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
421-
}
416+
/* Reinitialize Nic/Vecs objects */
417+
aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol);
422418

423419
if (netif_running(nic->ndev)) {
424420
ret = aq_nic_init(nic);
@@ -444,22 +440,22 @@ static int atl_resume_common(struct device *dev, bool deep)
444440

445441
static int aq_pm_freeze(struct device *dev)
446442
{
447-
return aq_suspend_common(dev, true);
443+
return aq_suspend_common(dev);
448444
}
449445

450446
static int aq_pm_suspend_poweroff(struct device *dev)
451447
{
452-
return aq_suspend_common(dev, true);
448+
return aq_suspend_common(dev);
453449
}
454450

455451
static int aq_pm_thaw(struct device *dev)
456452
{
457-
return atl_resume_common(dev, true);
453+
return atl_resume_common(dev);
458454
}
459455

460456
static int aq_pm_resume_restore(struct device *dev)
461457
{
462-
return atl_resume_common(dev, true);
458+
return atl_resume_common(dev);
463459
}
464460

465461
static const struct dev_pm_ops aq_pm_ops = {

0 commit comments

Comments
 (0)