diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-03-12 12:51:42 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-25 19:40:53 +0300 |
commit | e383c70474db32b9d4a3de6dfbd08784d19e6751 (patch) | |
tree | d8af3360d26de89f63b8484331ef9609d8d757b6 /drivers/net/wireless/ralink/rt2x00/rt2x00.h | |
parent | bb3b18c925333695261ccaad84c0edc100a4d9e2 (diff) | |
download | linux-e383c70474db32b9d4a3de6dfbd08784d19e6751.tar.xz |
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>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h index ebe4c7f90542..48c0957b18d1 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h @@ -1016,6 +1016,7 @@ struct rt2x00_dev { unsigned int extra_tx_headroom; struct usb_anchor *anchor; + unsigned int num_proto_errs; /* Clock for System On Chip devices. */ struct clk *clk; |