From patchwork Fri Nov 23 21:37:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Abinader X-Patchwork-Id: 10696361 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF11713AD for ; Fri, 23 Nov 2018 21:43:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE3852B39C for ; Fri, 23 Nov 2018 21:43:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADAFD2B3BE; Fri, 23 Nov 2018 21:43:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58FA52B39C for ; Fri, 23 Nov 2018 21:43:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726855AbeKXIXb (ORCPT ); Sat, 24 Nov 2018 03:23:31 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45642 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbeKXIXa (ORCPT ); Sat, 24 Nov 2018 03:23:30 -0500 Received: by mail-ed1-f68.google.com with SMTP id d39so11215353edb.12 for ; Fri, 23 Nov 2018 13:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=N2TsnoTzt7nMyhEJf0qrk+D/XMdg46HqMsOgCQBtd/M=; b=Fii6N9YpUQrpyy6pRyfB6/4Cc2IrDWUnae1dWNo2j4ipxa45s9esvcDYbcvmout8uS naGWT71z+02XXEXNaRiQPXop5WBcwgYqVbA0hbsbh7cvtqt4A0hdtyDutJfWNIGhcIXP 25dUfVN7+W/9NjI2JTfUqVEYZmUtzdI7GF89cDjhN3q1sFFQl25iIJ4u7YMJBJXBErnc dyTjEpfgygybDSi3NF6PuEnucoLt8zz6mlT4LsoRy8FSwDFsuEB5nFWcHs/lpWyCAkty wzbnc45udxYsgUQXjcmv9HkDKZJhrASSGHItbOd2vUksC4KD6MdKfyRVTfL8TPz4mLHw JZfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=N2TsnoTzt7nMyhEJf0qrk+D/XMdg46HqMsOgCQBtd/M=; b=WQ3YBbkN2Xy9AE+4uV+MLLp6looJhDVYxSlFDvb1XlRrTrMIiqpCoKLTKp3dyHEiFT YhHbg1vlyA6T3lQBXVFuClgoRqIseY5z9z7h3ESdOJlkGCbpBLdzppzwoAbJfXZ/G/gF LIA/VGp4OfD6ow2+cs72cZscsa+milj+ViPCwY6jCPtJ7N+S4HYNRPPxtQ4ONT+qQTt5 t7ZXzg3Jy/FAk8McOm14qa9NZNCZgUMYXOjqLNsripHOIN0bUnBqvGXcGtGcX7su8/ts jczxTF48TZO6WKgVEQL+tCPwAz9KCIS/Gbzg8c/RMO4T1SQFZd5vkvyZDvmuVOHk2Hvd aCOQ== X-Gm-Message-State: AGRZ1gLCHymAPwBsNOSiMDKV4IBCA+tZ+OlsUBsPR3eODr9dUAT0Naik Qn2IoacesJm9/qXMtKKxWPydHNFW X-Google-Smtp-Source: AJdET5fSy60Nbe7Pm2rwIAPM4ddte4LVKU99l2y3X9NNhzfYKeAUX1IAifaBOKcN4X4zfCkE5fNncQ== X-Received: by 2002:a17:906:2496:: with SMTP id e22-v6mr12666878ejb.84.1543009052273; Fri, 23 Nov 2018 13:37:32 -0800 (PST) Received: from localhost.localdomain (ip5f5aff54.dynamic.kabel-deutschland.de. [95.90.255.84]) by smtp.gmail.com with ESMTPSA id e14sm9015880edb.79.2018.11.23.13.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 13:37:31 -0800 (PST) From: Eduardo Abinader To: linux-wireless@vger.kernel.org, nbd@nbd.name, lorenzo.bianconi@redhat.com, sgruszka@redhat.com Cc: Eduardo Abinader Subject: [PATCH] mt76: handle protocol error to proper deinit rx_tasklet Date: Fri, 23 Nov 2018 22:37:24 +0100 Message-Id: <20181123213724.14018-1-eduardoabinader@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP During removal of usb dongle, noticed many unhandled rx urb below. This this patch, make it possible and early completion of the rx tasklet. mt76x2u 1-3.4.3.1.2:1.0: rx urb failed: -71 mt76x2u 1-3.4.3.1.2:1.0: rx urb failed: -71 mt76x2u 1-3.4.3.1.2:1.0: rx urb failed: -71 mt76x2u 1-3.4.3.1.2:1.0: rx urb failed: -71 ... Signed-off-by: Eduardo Abinader --- drivers/net/wireless/mediatek/mt76/usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c index 5f0faf07c346..dc33df9cd155 100644 --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c @@ -446,6 +446,7 @@ static void mt76u_complete_rx(struct urb *urb) case -ECONNRESET: case -ESHUTDOWN: case -ENOENT: + case -EPROTO: return; default: dev_err(dev->dev, "rx urb failed: %d\n", urb->status);