Re: can: m_can: tcan4x5x m_can_isr do not handle tx if rx fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




BTW: it's documented as level low in the bindings documentation:

|		interrupts = <14 IRQ_TYPE_LEVEL_LOW>;



Thank you very much. That was my false hope, I change the dt_binding for IRQ_TYPE_LEVEL_LOW=8

interrupts = <25 8>;
interrupts = <27 8>;
interrupts = <16 8>;

But without success, failure still occurs, maybe not so fast as with IRQ_TYPE_EDGE_FALLING (subjective). Interestingly, the first run after reboot may last longer than subsequent ones until it breaks. If it breaks, the interface is at random can0 or 1 or 2.


Here is an example, can1 brakes.  No more ISR fires after [ 1682.748485].
I added netdev_dbg before return, and netdev_ERR for out_fail.


[ 1682.747310] tcan4x5x spi4.0 can1: m_can_isr: enter ir=0x5800
[ 1682.747468] tcan4x5x spi4.0 can1: m_can_isr: netif_wake_queue done
[ 1682.747475] tcan4x5x spi4.0 can1: m_can_isr: return IRQ_HANDLED

[ 1682.747494] tcan4x5x spi4.0 can1: m_can_start_xmit netif_stop_queue done

//Last TX ISR (IR_TEFN was true)
[ 1682.747912] tcan4x5x spi4.0 can1: m_can_isr: enter ir=0x5800
//fifo not full and queue is stoppet -> wake queue
[ 1682.748053] tcan4x5x spi4.0 can1: m_can_isr: netif_wake_queue done
[ 1682.748061] tcan4x5x spi4.0 can1: m_can_isr: return IRQ_HANDLED

//Last RX-ISR
[ 1682.748199] tcan4x5x spi4.0 can1: m_can_isr: enter ir=0x1
done
[ 1682.748433] tcan4x5x spi4.0 can1: m_can_isr: return IRQ_HANDLED

//In m_can_tx_handler after fifo write an end, m_can_tx_fifo_full -> netif_stop_queue(dev);
[ 1682.748485] tcan4x5x spi4.0 can1: m_can_tx_handler m_can_tx_fifo_full

After that I expect m_can_isr with IR_TEFN flag in order to wake queue, but nothing follows. Write to socket returns permanently 105,ENOBUFS

Full dmesg output: https://pastebin.com/G0xikf3P

Maybe I should add some printk to skb.c and deb.c?



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux