mbox series

[net-next,v2,0/2] net: bcmgenet: fix aborted suspend

Message ID 1542650162-9229-1-git-send-email-opendmb@gmail.com
Headers show
Series net: bcmgenet: fix aborted suspend | expand

Message

Doug Berger Nov. 19, 2018, 5:56 p.m. UTC
It is not enough to return an error code from the driver suspend
routine. The driver must also restore the device functionality.

This commit corrects the issue introduced by commit 0db55093b566 
("net: bcmgenet: return correct value 'ret' from bcmgenet_power_down")
by calling the driver resume function if the suspend function returns
an error.

Changes in v2:
- Removed accidentally included write to HFB register

Doug Berger (2):
  net: bcmgenet: code movement
  net: bcmgenet: abort suspend on error

 drivers/net/ethernet/broadcom/genet/bcmgenet.c     | 63 +++++++++++-----------
 drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c |  2 +
 2 files changed, 35 insertions(+), 30 deletions(-)

Comments

David Miller Nov. 20, 2018, 2:43 a.m. UTC | #1
From: Doug Berger <opendmb@gmail.com>
Date: Mon, 19 Nov 2018 09:56:00 -0800

> It is not enough to return an error code from the driver suspend
> routine. The driver must also restore the device functionality.
> 
> This commit corrects the issue introduced by commit 0db55093b566 
> ("net: bcmgenet: return correct value 'ret' from bcmgenet_power_down")
> by calling the driver resume function if the suspend function returns
> an error.
> 
> Changes in v2:
> - Removed accidentally included write to HFB register

Doug, this doesn't apply cleanly to net-next.