msperl / linux-rpi

Other
22 stars 26 forks source link

mcp25xxfd: crash/bug when stopping/starting the can interface #7

Open irrwisch1 opened 5 years ago

irrwisch1 commented 5 years ago

Hi,

I was having two issues when stoping/starting the can interface.

The first issue was that sometimes an interrupt came when the interface was already stopped, producing a kernel panic

The second issue was that the driver was sometimes getting confused with the TEF fifo after restarting, presumably because some structures weren't cleared when the interface was stopped.

I made the following changes (see the attached diff) and those seem to fix these issues for me, but you may want to review those changes.

mcp25xxfd_crash.txt