Skip to content

Commit

Permalink
mt7601u: process URBs in status EPROTO properly
Browse files Browse the repository at this point in the history
When the usb device being plugged out, before the usb_driver:disconnect
called by e.g workqueue, it is possible that some URBs are still in
processing, and being marked as EPROTO in host controller.

Those URBs should not be scheduled in complete_rx callback function to
get further processing.

Signed-off-by: Zhi Han <z.han@gmx.net>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201217161302.GA12562@E480
  • Loading branch information
Zhi Han authored and Kalle Valo committed Jan 14, 2021
1 parent f4add10 commit 0e40dbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/mediatek/mt7601u/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ static void mt7601u_complete_rx(struct urb *urb)
case -ECONNRESET:
case -ESHUTDOWN:
case -ENOENT:
case -EPROTO:
return;
default:
dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
Expand Down

0 comments on commit 0e40dbd

Please sign in to comment.