WSL2-Linux-Kernel/drivers/net
Jeroen Hofstee 3b2d652da2 can: ti_hecc: properly report state changes
The HECC_CANES register handles the flags specially, it only updates
the flags after a one is written to them. Since the interrupt for
frame errors is not enabled an old error can hence been seen when a
state interrupt arrives. For example if the device is not connected
to the CAN-bus the error warning interrupt will have HECC_CANES
indicating there is no ack. The error passive interrupt thereafter
will have HECC_CANES flagging that there is a warning level. And if
thereafter there is a message successfully send HECC_CANES points to
an error passive event, while in reality it became error warning
again. In summary, the state is not always reported correctly.

So handle the state changes and frame errors separately. The state
changes are now based on the interrupt flags and handled directly
when they occur. The reporting of the frame errors is still done as
before, as a side effect of another interrupt.

note: the hecc_clear_bit will do a read, modify, write. So it will
not only clear the bit, but also reset all other bits being set as
a side affect, hence it is replaced with only clearing the flags.

note: The HECC_CANMC_CCR is no longer cleared in the state change
interrupt, it is completely unrelated.

And use net_ratelimit to make checkpatch happy.

Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-11-04 21:47:23 +01:00
..
appletalk
arcnet
bonding bonding: fix using uninitialized mode_lock 2019-10-29 18:03:36 -07:00
caif
can can: ti_hecc: properly report state changes 2019-11-04 21:47:23 +01:00
dsa net: dsa: bcm_sf2: Fix IMP setup for port different than 8 2019-11-01 15:08:21 -07:00
ethernet net: fec: add missed clk_disable_unprepare in remove 2019-11-04 11:35:21 -08:00
fddi
fjes fjes: Handle workqueue allocation failure 2019-10-29 10:33:10 -07:00
hamradio net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
hippi
hyperv hv_netvsc: Fix error handling in netvsc_attach() 2019-10-30 18:17:36 -07:00
ieee802154 Merge tag 'ieee802154-for-davem-2019-09-28' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan 2019-09-30 17:14:45 -07:00
ipvlan net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
netdevsim netdevsim: Fix use-after-free during device dismantle 2019-10-31 12:35:14 -07:00
phy net: phylink: Fix phylink_dbg() macro 2019-11-01 15:06:46 -07:00
plip
ppp net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
slip
team team: fix nested locking lockdep warning 2019-10-24 14:53:48 -07:00
usb net: usb: lan78xx: Disable interrupts before calling generic_handle_irq() 2019-10-28 16:35:04 -07:00
vmxnet3
wan
wimax wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle 2019-10-29 16:20:25 -07:00
wireless wireless-drivers fixes for 5.4 2019-11-01 10:36:46 -07:00
xen-netback xen/netback: fix error path of xenvif_connect_data() 2019-10-19 11:43:29 -07:00
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c net: remove unnecessary variables and callback 2019-10-24 14:53:49 -07:00
macvlan.c net: remove unnecessary variables and callback 2019-10-24 14:53:49 -07:00
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: remove possible false sharing in tun_flow_update() 2019-10-09 21:29:33 -07:00
veth.c
virtio_net.c netfilter: drop bridge nf reset from nf_reset 2019-10-01 18:42:15 +02:00
vrf.c net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
vsockmon.c
vxlan.c vxlan: fix unexpected failure of vxlan_changelink() 2019-10-30 11:52:47 -07:00
xen-netfront.c xen-netfront: do not use ~0U as error return value for xennet_fill_frags() 2019-10-01 21:49:51 -04:00