summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/peak_canfd/peak_pciefd_main.c
diff options
context:
space:
mode:
authorMarek Vasut2018-03-01 19:34:00 +0100
committerMarc Kleine-Budde2018-03-12 09:55:12 +0100
commit880dd464b4304583c557c4e5f5ecebfd55d232b1 (patch)
treee4500fb5f7ffd4aa107f8fcdbcfb2608e772a43a /drivers/net/can/peak_canfd/peak_pciefd_main.c
parentcan: ifi: Check core revision upon probe (diff)
downloadkernel-qcow2-linux-880dd464b4304583c557c4e5f5ecebfd55d232b1.tar.gz
kernel-qcow2-linux-880dd464b4304583c557c4e5f5ecebfd55d232b1.tar.xz
kernel-qcow2-linux-880dd464b4304583c557c4e5f5ecebfd55d232b1.zip
can: ifi: Repair the error handling
The new version of the IFI CANFD core has significantly less complex error state indication logic. In particular, the warning/error state bits are no longer all over the place, but are all present in the STATUS register. Moreover, there is a new IRQ register bit indicating transition between error states (active/warning/passive/busoff). This patch makes use of this bit to weed out the obscure selective INTERRUPT register clearing, which was used to carry over the error state indication into the poll function. While at it, this patch fixes the handling of the ACTIVE state, since the hardware provides indication of the core being in ACTIVE state and that in turn fixes the state transition indication toward userspace. Finally, register reads in the poll function are moved to the matching subfunctions since those are also no longer needed in the poll function. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Markus Marb <markus@marb.org> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/peak_canfd/peak_pciefd_main.c')
0 files changed, 0 insertions, 0 deletions