• Thomas Gleixner's avatar
    can: c_can: Make it SMP safe · 640916db
    Thomas Gleixner authored
    The hardware has two message control interfaces, but the code only uses the
    first one. So on SMP the following can be observed:
    
    CPU0 	       	CPU1
    rx_poll()
      write IF1	xmit()
    		write IF1
      write IF1
    
    That results in corrupted message object configurations. The TX/RX is not
    globally serialized it's only serialized on a core.
    
    Simple solution: Let RX use IF1 and TX use IF2 and all is good.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    640916db
c_can.c 35.4 KB