From: Ira W. Snyder Date: Thu, 19 Jul 2012 15:54:42 +0000 (-0700) Subject: can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS X-Git-Tag: v3.6-rc1~125^2~56^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83702f69272e4591a91a27eb58eade1bcd361dae;p=pandora-kernel.git can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS The Janz VMOD-ICAN3 firmware does not support any sort of TX-done notification or interrupt. The driver previously used the hardware loopback to attempt to work around this deficiency, but this caused all sockets to receive all messages, even if CAN_RAW_RECV_OWN_MSGS is off. Using the new function ican3_cmp_echo_skb(), we can drop the loopback messages and return the original skbs. This fixes the issues with CAN_RAW_RECV_OWN_MSGS. A private skb queue is used to store the echo skbs. This avoids the need for any index management. Due to a lack of TX-error interrupts, bus errors are permanently enabled, and are used as a TX-error notification. This is used to drop an echo skb when transmission fails. Bus error packets are not generated if the user has not enabled bus error reporting. Signed-off-by: Ira W. Snyder Signed-off-by: Marc Kleine-Budde --- Reading git-diff-tree failed