]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: ems_usb: Fix possible tx overflow
authorGerhard Uttenthaler <uttenthaler@ems-wuensche.com>
Tue, 22 Dec 2015 16:29:16 +0000 (17:29 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 7 Mar 2016 17:33:23 +0000 (12:33 -0500)
commit0861e96600db2ecbd9659b3eafc292641e3ec69c
tree9669281af4e71b474d94a228d9e7bd57a34e96ab
parentcbd382759e953e56701202591e765e7e17957eef
can: ems_usb: Fix possible tx overflow

[ Upstream commit 90cfde46586d2286488d8ed636929e936c0c9ab2 ]

This patch fixes the problem that more CAN messages could be sent to the
interface as could be send on the CAN bus. This was more likely for slow baud
rates. The sleeping _start_xmit was woken up in the _write_bulk_callback. Under
heavy TX load this produced another bulk transfer without checking the
free_slots variable and hence caused the overflow in the interface.

Signed-off-by: Gerhard Uttenthaler <uttenthaler@ems-wuensche.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/net/can/usb/ems_usb.c