Skip to content

Commit ed53ae7

Browse files
sgruszkaKalle Valo
authored andcommitted
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 e383c70 ("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: e383c70 ("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
1 parent 2a9e985 commit ed53ae7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/wireless/ralink/rt2x00/rt2x00usb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev *rt2x00dev, int status)
2525
if (status == -ENODEV || status == -ENOENT)
2626
return true;
2727

28+
if (!test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags))
29+
return false;
30+
2831
if (status == -EPROTO || status == -ETIMEDOUT)
2932
rt2x00dev->num_proto_errs++;
3033
else

0 commit comments

Comments
 (0)