Skip to content

can: c_can: Fix a series of serious bugs and improve the performance

Thomas Gleixner linux-can lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12can: c_can: Wait for CONTROL_INIT to be cleareddrivers/net/can/c_can/c_can.c+23 -32 replies
2/12can: c_can: Fix hardware raminit functiondrivers/net/can/c_can/c_can_platform.c+39 -94 replies
3/12can: c_can: Make it SMP safedrivers/net/can/c_can/c_can.c+21 -152 replies
4/12can: c_can: Fix buffer ordering for realdrivers/net/can/c_can/c_can.c+50 -20 replies
5/12can: c_can: Fix the lost message handlingdrivers/net/can/c_can/c_can.c+15 -160 replies
6/12can: c_can: Remove braindamaged EOB exitdrivers/net/can/c_can/c_can.c+0 -30 replies
7/12can: c_can: Provide protection in the xmit pathdrivers/net/can/c_can/c_can.c drivers/net/can/c_can/c_can.h+9 -10 replies
8/12can: c_can: Makethe code readabledrivers/net/can/c_can/c_can.c+56 -514 replies
9/12can: c_can: Reduce register access for realdrivers/net/can/c_can/c_can.c+15 -340 replies
10/12can: c_can: Store dlc privatedrivers/net/can/c_can/c_can.c drivers/net/can/c_can/c_can.h+29 -270 replies
11/12can: c_can: Simplify TX interrupt cleanupdrivers/net/can/c_can/c_can.c+17 -200 replies
12/12can: c_can: Avoid led toggling for every packet.drivers/net/can/c_can/c_can.c+4 -34 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 00/12] can: c_can: Fix a series of serious bugs and improve the performance

First of all, I'm really grumpy as hell.

This is the worst driver I looked at in the last 10 years. And that's an achievement.

The driver is full of serious bugs:

- Two HW init routines are not spec compliant.

- Completely defective message buffer handling in several ways That leads to interrupt storms and complete lockups.

- Complete lack of SMP awareness

What's amazing is that people "optimize" and "fix" the driver over and over, but nobody bothered to understand the manual and repair the code for real.

The series fixes _ALL_ bugs which I found so far, but I'm sure there are more issues burried in that unreadable mess. I'm just not able to trigger them.

The last few patches add real performance improvements by removing a gazillion of pointless hardware operations.

Thanks,

tglx

--------------->

 c_can.c          |  311 ++++++++++++++++++++++++++++++-------------------------
 c_can.h          |   29 +++++
 c_can_platform.c |   48 ++++++--
 3 files changed, 241 insertions(+), 147 deletions(-)