]> 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)
commit22ce33a917154d876de6b0103aa059d716c15f43
treed8af3360d26de89f63b8484331ef9609d8d757b6
parente0de4ea07a159d4f0e6cf233535cebbc391dbbd1
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