linux/drivers/net/can
Lukas Wunner 32bee8f48f can: hi311x: Work around TX complete interrupt erratum
When sending packets as fast as possible using "cangen -g 0 -i -x", the
HI-3110 occasionally latches the interrupt pin high on completion of a
packet, but doesn't set the TXCPLT bit in the INTF register.  The INTF
register contains 0x00 as if no interrupt has occurred.  Even waiting
for a few milliseconds after the interrupt doesn't help.

Work around this apparent erratum by instead checking the TXMTY bit in
the STATF register ("TX FIFO empty").  We know that we've queued up a
packet for transmission if priv->tx_len is nonzero.  If the TX FIFO is
empty, transmission of that packet must have completed.

Note that this is congruent with our handling of received packets, which
likewise gleans from the STATF register whether a packet is waiting in
the RX FIFO, instead of looking at the INTF register.

Cc: Mathias Duckeck <m.duckeck@kunbus.de>
Cc: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Casey Fitzpatrick <casey.fitzpatrick@timesys.com>
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Akshay Bhat <akshay.bhat@timesys.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-05-10 18:25:30 +02:00
..
c_can
cc770
ifi_canfd
m_can
mscan
peak_canfd
rcar
sja1000
softing
spi can: hi311x: Work around TX complete interrupt erratum 2018-05-10 18:25:30 +02:00
usb can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg() 2018-05-08 10:41:38 +02:00
Kconfig
Makefile
at91_can.c
dev.c
flexcan.c can: flexcan: fix endianess detection 2018-05-08 10:41:38 +02:00
grcan.c
janz-ican3.c
led.c
pch_can.c
rx-offload.c
slcan.c
sun4i_can.c
ti_hecc.c
vcan.c
vxcan.c
xilinx_can.c