can: sja1000: Add support for CAN_CTRLMODE_LOOPBACK
authorNikita Edward Baruzdin <nebaruzdin@gmail.com>
Fri, 11 Jul 2014 12:13:20 +0000 (16:13 +0400)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 15 Jul 2014 07:34:23 +0000 (09:34 +0200)
commitdcf9e152670ea74dec24ec9ad57c495e631edba9
tree268d40c8d30383c0c2230bd176ccae533e906297
parent4b9e1bab12c9b6de965268c2fbe6ebbb35dddd89
can: sja1000: Add support for CAN_CTRLMODE_LOOPBACK

This adds support for hardware loopback in SJA1000 by utilising its self
reception request (SRR) feature. Upon SRR the message is transmitted and
received simultaneously, meaning you can't have hardware loopback
without actually sending a message to the CAN bus in case of SJA1000.

Signed-off-by: Nikita Edward Baruzdin <nebaruzdin@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/sja1000/sja1000.c