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)
commit35bdafb576c5c0a06815e7a681571c3ab950ff7e
tree4dfc42fc1a7181c5bb49114a5ec1816d3278e38c
parentd48071be6cb94912cf3c3ac0b4d520438fab4778
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