Commit a95ae3b7 authored by Pfeiffer, Götz's avatar Pfeiffer, Götz
Browse files

Some status codes the VCAN2 card sometimes returns are now better handled.


The VCAN2 card sometimes returns status values that are only documented for
the VCAN4 card. The driver has been changed in order to handle these cases
too.
parent f4681587
......@@ -2309,12 +2309,14 @@ static boolean check_status(register word stat,
case CAN_STAT_RTR_RECVD:
case CAN_STAT_REM_WAIT4RX:
case CAN_STAT_TRANSMITTING:
#ifdef VCAN4
/* the following 3 status values are only documented for
the VCAN4 card but at least CAN_STAT_TX_IN_QUEUE is sometimes
generated by the VCAN2 card: */
case CAN_STAT_TX_NODE_ACT:
case CAN_STAT_TX_Q_ACT:
case CAN_STAT_TX_IN_QUEUE:
#endif /* VCAN4 */
return(TRUE);
case CAN_STAT_RX_TMOUT:
#if CI_WRITE_TMO_ERR
......
......@@ -156,10 +156,11 @@ enum can_status_masks { CAN_STAT_SUCCESS = 0x0000,
CAN_STAT_RTR_RECVD = 0x0101,
/* RTR-frame received */
CAN_STAT_RTR_SENDERR = 0x0104,
#ifndef VCAN4
/* the sending of the RTR-frame failed,
this status is UNDOCUMENTED !! */
#else /* VCAN4 */
/* the following 3 status values are only documented
* for the VCAN4 card but at least CAN_STAT_TX_IN_QUEUE
* is sometimes generated by the VCAN2 card: */
/* the sending of the RTR-frame failed */
CAN_STAT_TX_NODE_ACT = 0xFFFB,
/* tx busy by node link*/
......@@ -167,7 +168,7 @@ enum can_status_masks { CAN_STAT_SUCCESS = 0x0000,
/* tx busy, from queue to active*/
CAN_STAT_TX_IN_QUEUE = 0xFFFD,
/* tx busy, in queue */
#endif /* VCAN4 */
CAN_STAT_REM_WAIT4RX = 0xFFFE,
/* waiting for RX at "remote request" */
CAN_STAT_TRANSMITTING= 0xFFFF
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment