]> 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)
commit13b1d5a89cef5c7ced53d3d2577711b751bcee72
tree4dfc42fc1a7181c5bb49114a5ec1816d3278e38c
parentf58a89af332ebdb752a121565a4f63ae1a3ec79d
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