diff mbox series

mt7601u: process URBs in status EPROTO properly

Message ID 20201217161302.GA12562@E480
State New
Headers show
Series mt7601u: process URBs in status EPROTO properly | expand

Commit Message

Zhi Han Dec. 17, 2020, 4:13 p.m. UTC
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>
---
 drivers/net/wireless/mediatek/mt7601u/dma.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo Jan. 14, 2021, 5:30 p.m. UTC | #1
Zhi Han <z.han@gmx.net> wrote:

> 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>


Patch applied to wireless-drivers-next.git, thanks.

0e40dbd56d67 mt7601u: process URBs in status EPROTO properly

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201217161302.GA12562@E480/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c
index 09f931d4598c..7a9ab787cf3d 100644
--- a/drivers/net/wireless/mediatek/mt7601u/dma.c
+++ b/drivers/net/wireless/mediatek/mt7601u/dma.c
@@ -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",