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 drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ifi_canfd can: ifi: Repair the error handling 2018-03-12 09:55:12 +01:00
m_can can: m_can: select pinctrl state in each suspend/resume function 2018-03-12 10:38:20 +01:00
mscan
peak_canfd can: peak/pcie_fd: remove useless code when interface starts 2018-03-12 09:55:12 +01:00
rcar
sja1000 drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
softing drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
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 can: remove bfin_can driver 2018-03-26 15:57:02 +02:00
Makefile can: remove bfin_can driver 2018-03-26 15:57:02 +02:00
at91_can.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
dev.c can: dev: increase bus-off message severity 2018-05-08 10:41:38 +02:00
flexcan.c can: flexcan: fix endianess detection 2018-05-08 10:41:38 +02:00
grcan.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
janz-ican3.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
led.c
pch_can.c
rx-offload.c
slcan.c
sun4i_can.c
ti_hecc.c
vcan.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
vxcan.c
xilinx_can.c