]> 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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 3 Mar 2016 11:45:52 +0000 (12:45 +0100)
commit0255cfabc796feb07444dc0b04780a9b9f3d3d70
treed7457ca9947484a7b41f17f24682d10ceda8b13e
parentac1c97af50cea184619281620520e76bee15cfdf
can: ems_usb: Fix possible tx overflow

commit 90cfde46586d2286488d8ed636929e936c0c9ab2 upstream.

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/can/usb/ems_usb.c