2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00
linux-next/drivers/net/can
Thomas Gleixner 07c7b6f616 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>
2014-04-01 11:54:59 +02:00
..
c_can can: c_can: Fix the lost message handling 2014-04-01 11:54:59 +02:00
cc770 can: cc770: use dev_get_platdata() 2013-09-21 15:43:13 +02:00
mscan Merge remote-tracking branch 'agust/next' into next 2014-01-29 16:53:55 +11:00
sja1000 can: sja1000: add support for Elcus CAN200PCI 2014-01-11 19:43:16 +01:00
softing drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
usb can: usb_8dev: Fix memory leak in usb_8dev_start_xmit 2014-04-01 11:54:55 +02:00
at91_can.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
bfin_can.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
dev.c can: add destructor for self generated skbs 2014-01-30 16:25:49 -08:00
flexcan.c can: flexcan: factor out soft reset into seperate funtion 2014-03-03 14:29:51 +01:00
grcan.c drivers: remove unnecessary prom.h includes 2013-10-09 20:03:58 -05:00
janz-ican3.c linux-can-fixes-for-3.14-20140129 2014-01-30 16:48:17 -08:00
Kconfig can: flexcan: fix flexcan driver build for big endian on ARM and little endian on PowerPc 2014-01-29 20:23:22 +01:00
led.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
Makefile can: add tx/rx LED trigger support 2013-01-26 16:58:59 +01:00
mcp251x.c can: mcp251x: Add device tree support 2013-12-21 15:04:24 +01:00
pch_can.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
slcan.c can: Fix FSF address in file headers 2013-12-17 11:47:21 +01:00
ti_hecc.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
vcan.c can: add destructor for self generated skbs 2014-01-30 16:25:49 -08:00