diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-03-18 17:19:10 (GMT) |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-04-01 09:54:59 (GMT) |
commit | 07c7b6f6161be52b8ab6bca70ed6a7140708c94e (patch) | |
tree | 66410feb92de31d004ec2dfbf3cf69d307145cb0 /drivers/hid/hid-samsung.c | |
parent | 64f08f2f3544eb8b6b14fd35e6087d7d3ede77cd (diff) | |
download | linux-07c7b6f6161be52b8ab6bca70ed6a7140708c94e.tar.xz |
can: c_can: Fix the lost message handling
The lost message handling is broken in several ways.
1) Clearing the message lost flag is done by writing 0 to the
message control register of the object.
#define IF_MCONT_CLR_MSGLST (0 << 14)
That clears the object buffer configuration in the worst case,
which results in a loss of the EOB flag. That leaves the FIFO chain
without a limit and causes a complete lockup of the HW
2) In case that the error skb allocation fails, the code happily
claims that it handed down a packet. Just an accounting bug, but ....
3) The code adds a lot of pointless overhead to that error case, where
we need to get stuff done as fast as possible to avoid more packet
loss.
- printk an annoying error message
- reread the object buffer for nothing
Fix is simple again:
- Use the already known MSGCTRL content and only clear the MSGLST bit
- Fix the buffer accounting by adding a proper return code
- Remove the pointless operations
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/hid/hid-samsung.c')
0 files changed, 0 insertions, 0 deletions