1. 22 7月, 2012 11 次提交
  2. 21 7月, 2012 26 次提交
  3. 20 7月, 2012 3 次提交
    • I
      can: janz-ican3: add support for one shot mode · 3b5c6b9e
      Ira W. Snyder 提交于
      The Janz VMOD-ICAN3 hardware has support for one shot packet
      transmission. This means that a packet will be attempted to be sent
      once, with no automatic retries.
      
      The SocketCAN core has a controller-wide setting for this mode:
      CAN_CTRLMODE_ONE_SHOT. The Janz VMOD-ICAN3 hardware supports this flag
      on a per-packet level, but the SocketCAN core does not.
      Signed-off-by: NIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      3b5c6b9e
    • I
      can: janz-ican3: avoid firmware lockup caused by infinite bus error quota · 30df5888
      Ira W. Snyder 提交于
      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: NIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      30df5888
    • I
      can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS · 83702f69
      Ira W. Snyder 提交于
      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: NIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      83702f69