]> git.baikalelectronics.ru Git - kernel.git/commit
can: janz-ican3: avoid firmware lockup caused by infinite bus error quota
authorIra W. Snyder <iws@ovro.caltech.edu>
Wed, 18 Jul 2012 22:33:17 +0000 (15:33 -0700)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 20 Jul 2012 15:49:05 +0000 (17:49 +0200)
commit926a34cc31b7992dbe9b43ac0c2359a4110dab3c
tree0a72a7baf1848b142cefb54ced268d600af655c8
parentb5e50d7d646a66a8e018e68e3d6f2250d2abf0b2
can: janz-ican3: avoid firmware lockup caused by infinite bus error quota

If the bus error quota is set to infinite and the host CPU cannot keep
up, the Janz VMOD-ICAN3 firmware will stop responding to control
messages until the controller is reset.

The firmware will automatically stop sending bus error messages when the
quota is reached, and will only resume sending bus error messages when
the quota is re-set to a positive value.

This limitation is worked around by setting the bus error quota to one
message, and then re-setting the quota to one message every time a bus
error message is received. By doing this, the firmware never stops
responding to control messages. The CAN bus can be reset without a
hard-reset of the controller card.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/janz-ican3.c