mbox series

[net-next,0/7] r8169: mark device as detached in PCI D3 and improve locking

Message ID 2e68df85-4f64-d45b-3c4c-bb8cb9a4411d@gmail.com
Headers show
Series r8169: mark device as detached in PCI D3 and improve locking | expand

Message

Heiner Kallweit June 20, 2020, 8:33 p.m. UTC
Mark the netdevice as detached whenever parent is in PCI D3hot and not
accessible. This mainly applies to runtime-suspend state.
In addition take RTNL lock in suspend calls, this allows to remove
the driver-specific mutex and improve PM callbacks in general.

Heiner Kallweit (7):
  net: core: try to runtime-resume detached device in __dev_open
  r8169: mark device as not present when in PCI D3
  r8169: remove no longer needed checks for device being runtime-active
  r8169: add rtl8169_up
  r8169: use RTNL to protect critical sections
  r8169: remove driver-specific mutex
  r8169: improve rtl8169_runtime_resume

 drivers/net/ethernet/realtek/r8169_main.c | 181 +++++-----------------
 net/core/dev.c                            |  10 +-
 2 files changed, 49 insertions(+), 142 deletions(-)

Comments

Jakub Kicinski June 22, 2020, 10:27 p.m. UTC | #1
On Sat, 20 Jun 2020 22:33:39 +0200 Heiner Kallweit wrote:
> Mark the netdevice as detached whenever parent is in PCI D3hot and not
> accessible. This mainly applies to runtime-suspend state.
> In addition take RTNL lock in suspend calls, this allows to remove
> the driver-specific mutex and improve PM callbacks in general.

Not an expert on PM but looks like a nice improvement to me:

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
David Miller June 22, 2020, 11:26 p.m. UTC | #2
From: Jakub Kicinski <kuba@kernel.org>
Date: Mon, 22 Jun 2020 15:27:04 -0700

> On Sat, 20 Jun 2020 22:33:39 +0200 Heiner Kallweit wrote:
>> Mark the netdevice as detached whenever parent is in PCI D3hot and not
>> accessible. This mainly applies to runtime-suspend state.
>> In addition take RTNL lock in suspend calls, this allows to remove
>> the driver-specific mutex and improve PM callbacks in general.
> 
> Not an expert on PM but looks like a nice improvement to me:
> 
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>

Series applied, thanks everyone.