Chunhao Lin <h...@realtek.com> :
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c 
> b/drivers/net/ethernet/realtek/r8169.c
> index 537974c..404be51 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
[...]
> @@ -7853,6 +7859,11 @@ static int rtl8169_runtime_suspend(struct device 
> *device)
>  
>       rtl8169_net_suspend(dev);
>  
> +     /* Update counters before going runtime suspend */
> +     if (netif_running(dev))

This test is useless (always true):

- rtl_open
  [...]
  pm_runtime_get_sync(&pdev->dev);
  [...]
  tp->TxDescArray = blah
  [...]

- rtl8169_close
  [...]
  pm_runtime_get_sync(&pdev->dev);
  [...]
  tp->TxDescArray = NULL;

- rtl8169_runtime_suspend
  [...]
  if (!tp->TxDescArray)
          return 0;

(the implicit smp barriers are mildly obvious, ok)

-- 
Ueimor

Reply via email to