android_kernel_oneplus_msm8998/drivers/net
Kai-Heng Feng 02975ee737 r8169: Clear RTL_FLAG_TASK_*_PENDING when clearing RTL_FLAG_TASK_ENABLED
[ Upstream commit 6ad569019999300afd8e614d296fdc356550b77f ]

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@gmail.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10 08:52:12 +02:00
..
appletalk net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT 2018-09-29 03:08:52 -07:00
arcnet arcnet/com20020: add LEDS_CLASS dependency 2015-11-03 11:29:56 -05:00
bonding bonding: re-evaluate force_primary when the primary slave name changes 2018-07-03 11:21:25 +02:00
caif net: caif: check return value of alloc_netdev 2015-11-09 11:31:13 -05:00
can can: mpc5xxx_can: check of_iomap return before use 2018-09-05 09:18:35 +02:00
cris
dsa net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change 2016-12-10 19:07:23 +01:00
ethernet r8169: Clear RTL_FLAG_TASK_*_PENDING when clearing RTL_FLAG_TASK_ENABLED 2018-10-10 08:52:12 +02:00
fddi
fjes fjes: Fix wrong netdevice feature flags 2017-12-20 10:04:55 +01:00
hamradio net: hamradio: use eth_broadcast_addr 2018-08-24 13:26:55 +02:00
hippi hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close 2018-02-25 11:03:42 +01:00
hyperv hv_netvsc: use skb_get_hash() instead of a homegrown implementation 2017-03-26 12:13:18 +02:00
ieee802154 ieee802154: fakelb: switch from BUG_ON() to WARN_ON() on problem 2018-08-24 13:26:58 +02:00
ipvlan ipvlan: add L2 check for packets arriving via virtual devices 2018-03-22 09:23:30 +01:00
irda irda: fix overly long udelay() 2018-06-06 16:46:21 +02:00
phy net: phy: fix flag masking in __set_phy_supported 2018-07-25 10:18:17 +02:00
plip
ppp pppoe: check sockaddr length in pppoe_connect() 2018-04-29 07:50:05 +02:00
slip slip: Check if rstate is initialized before uncompressing 2018-04-24 09:32:04 +02:00
team team: use netdev_features_t instead of u32 2018-06-13 16:15:29 +02:00
usb net: lan78xx: Fix misplaced tasklet_schedule() call 2018-09-09 20:04:32 +02:00
vmxnet3 vmxnet3: ensure that adapter is in proper state during force_close 2018-04-13 19:50:04 +02:00
wan drivers: net: lmc: fix case value for target abort error 2018-09-05 09:18:36 +02:00
wimax net: wimax/i2400m: fix NULL-deref at probe 2017-12-20 10:04:54 +01:00
wireless mac80211_hwsim: correct use of IEEE80211_VHT_CAP_RXSTBC_X 2018-10-10 08:52:10 +02:00
xen-netback xen/netback: set default upper limit of tx/rx queues to 8 2017-11-15 17:13:09 +01:00
dummy.c
eql.c
geneve.c geneve: avoid use-after-free of skb->data 2016-12-10 19:07:24 +01:00
ifb.c
Kconfig vmxnet3: prevent building with 64K pages 2018-02-25 11:03:42 +01:00
LICENSE.SRC
loopback.c net: introduce device min_header_len 2017-02-18 16:39:27 +01:00
macvlan.c macvlan: Only deliver one copy of the frame to the macvlan interface 2017-12-20 10:05:01 +01:00
macvtap.c tun/tap: sanitize TUNSETSNDBUF input 2017-11-18 11:11:05 +01:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: fix deadlock on SMP 2016-04-12 09:08:58 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: allow positive return values on dev_get_valid_name() call 2017-11-18 11:11:06 +01:00
veth.c veth: set peer GSO values 2018-03-22 09:23:29 +01:00
virtio_net.c virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS 2018-05-30 07:49:11 +02:00
vrf.c vrf: Fix use after free and double free in vrf_finish_output 2018-04-13 19:50:27 +02:00
vxlan.c vxlan: dont migrate permanent fdb entries during learn 2018-04-13 19:50:21 +02:00
xen-netfront.c xen/netfront: don't bug in case of too many frags 2018-09-29 03:08:51 -07:00