When the bus-off condition occurs, the controller resets the TXQ and an interrupt is raised for the drivers. The drivers may already be writing a new frame into the controller which occurs after the reset. When the bus-off interrupt is eventually handled it clears all the host queues, but the frame entered into the controller may eventually become transmitted and the transmit event will become spurious. To handle this race, the bus off handler must erase the TXQ (the handler must also complete before bus-off recovery completes, which is at most 128 x 11 bit times = 1.4ms at 1Mbit/sec).
After bus-off occurs there may be outstanding transmit events that must be handled using the host transmit queue structure before that queue is erased. This can be done in the bus-off handling ISR before the host structures are erased, or the ISR can handle transmit events before the bus off event.
When the bus-off condition occurs, the controller resets the TXQ and an interrupt is raised for the drivers. The drivers may already be writing a new frame into the controller which occurs after the reset. When the bus-off interrupt is eventually handled it clears all the host queues, but the frame entered into the controller may eventually become transmitted and the transmit event will become spurious. To handle this race, the bus off handler must erase the TXQ (the handler must also complete before bus-off recovery completes, which is at most 128 x 11 bit times = 1.4ms at 1Mbit/sec).
After bus-off occurs there may be outstanding transmit events that must be handled using the host transmit queue structure before that queue is erased. This can be done in the bus-off handling ISR before the host structures are erased, or the ISR can handle transmit events before the bus off event.