]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: check number of EPROTO errors
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 12 Mar 2019 09:51:42 +0000 (10:51 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 25 Apr 2019 16:40:53 +0000 (19:40 +0300)
commitc0e9f3f4233e1a0ae78d00923afe929e299ca6fd
treed8af3360d26de89f63b8484331ef9609d8d757b6
parent730271c92ba0d697c99f225bf2d191961190bf12
rt2x00: check number of EPROTO errors

Some USB host devices/drivers on some conditions can always return
EPROTO error on submitted URBs. That can cause infinity loop in the
rt2x00 driver.

Since we can have single EPROTO errors we can not mark as device as
removed to avoid infinity loop. However we can count consecutive
EPROTO errors and mark device as removed if get lot of it.
I choose number 10 as threshold.

Reported-and-tested-by: Randy Oostdyk <linux-kernel@oostdyk.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2x00.h
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c