]> git.baikalelectronics.ru Git - kernel.git/commit
can: c_can: Remove tx locking
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Apr 2014 08:13:22 +0000 (08:13 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Apr 2014 20:09:01 +0000 (22:09 +0200)
commit331826ca9b86ddd46d3c4ed59c89c4ab19026f2d
tree4dfc42fc1a7181c5bb49114a5ec1816d3278e38c
parentaea62c268b35bd137ef54c451522a5a1cdc35a44
can: c_can: Remove tx locking

Mark suggested to use one IF for the softirq and the other for the
xmit function to avoid the xmit lock.

That requires to write the frame into the interface first, then handle
the echo skb and store the dlc before committing the TX request to the
message ram.

We use an atomic to handle the active buffers instead of reading the
MSGVAL register as thats way faster especially on PCH/x86.

Suggested-by: Mark <mark5@del-llc.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c
drivers/net/can/c_can/c_can.h