summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStanislaw Gruszka <stf_xl@wp.pl>2021-11-11 15:10:03 +0100
committerKalle Valo <kvalo@codeaurora.org>2021-11-29 12:53:50 +0200
commited53ae75693096f1c10b4561edd31a07b631bd72 (patch)
tree266f5590582b2214458e4a1a1a0eadca337f21f5 /drivers
parent2a9e9857473bfc5721092ff274bc1e371e5a0d2f (diff)
downloadlinux-stable-ed53ae75693096f1c10b4561edd31a07b631bd72.tar.gz
linux-stable-ed53ae75693096f1c10b4561edd31a07b631bd72.tar.bz2
linux-stable-ed53ae75693096f1c10b4561edd31a07b631bd72.zip
rt2x00: do not mark device gone on EPROTO errors during start
As reported by Exuvo is possible that we have lot's of EPROTO errors during device start i.e. firmware load. But after that device works correctly. Hence marking device gone by few EPROTO errors done by commit e383c70474db ("rt2x00: check number of EPROTO errors") caused regression - Exuvo device stop working after kernel update. To fix disable the check during device start. Link: https://lore.kernel.org/linux-wireless/bff7d309-a816-6a75-51b6-5928ef4f7a8c@exuvo.se/ Reported-and-tested-by: Exuvo <exuvo@exuvo.se> Fixes: e383c70474db ("rt2x00: check number of EPROTO errors") Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20211111141003.GA134627@wp.pl
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2x00usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index e4473a551241..74c3d8cb3100 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -25,6 +25,9 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev *rt2x00dev, int status)
if (status == -ENODEV || status == -ENOENT)
return true;
+ if (!test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags))
+ return false;
+
if (status == -EPROTO || status == -ETIMEDOUT)
rt2x00dev->num_proto_errs++;
else