[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180912.000604.691229117082896536.davem@davemloft.net>
Date: Wed, 12 Sep 2018 00:06:04 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kai.heng.feng@...onical.com
Cc: nic_swsd@...ltek.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, hkallweit1@...il.com
Subject: Re: [PATCH v2] r8169: Clear RTL_FLAG_TASK_*_PENDING when clearing
RTL_FLAG_TASK_ENABLED
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
Date: Tue, 11 Sep 2018 01:51:43 +0800
> After system suspend, sometimes the r8169 doesn't work when ethernet
> cable gets pluggued.
>
> This issue happens because rtl_reset_work() doesn't get called from
> rtl8169_runtime_resume(), after system suspend.
>
> In rtl_task(), RTL_FLAG_TASK_* only gets cleared if this condition is
> met:
> if (!netif_running(dev) ||
> !test_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags))
> ...
>
> If RTL_FLAG_TASK_ENABLED was cleared during system suspend while
> RTL_FLAG_TASK_RESET_PENDING was set, the next rtl_schedule_task() won't
> schedule task as the flag is still there.
>
> So in addition to clearing RTL_FLAG_TASK_ENABLED, also clears other
> flags.
>
> Cc: Heiner Kallweit <hkallweit1@...il.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
> ---
> v2:
> - Use bitmap_zero(), suggested by Florian Fainelli.
> - Assign zero to first enum member in rtl_flag, just in case.
Applied, thank you.
Powered by blists - more mailing lists