linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hayes Wang <hayeswang@realtek.com>
To: <netdev@vger.kernel.org>
Cc: <nic_swsd@realtek.com>, <linux-kernel@vger.kernel.org>,
	Hayes Wang <hayeswang@realtek.com>
Subject: [PATCH net v3 1/2] Revert "r8152: napi hangup fix after disconnect"
Date: Wed, 28 Aug 2019 09:51:41 +0800	[thread overview]
Message-ID: <1394712342-15778-321-Taiwan-albertk@realtek.com> (raw)
In-Reply-To: <1394712342-15778-320-Taiwan-albertk@realtek.com>

This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5.

The commit 0ee1f4734967 ("r8152: napi hangup fix after
disconnect") adds a check about RTL8152_UNPLUG to determine
if calling napi_disable() is invalid in rtl8152_close(),
when rtl8152_disconnect() is called. This avoids to use
napi_disable() after calling netif_napi_del().

Howver, commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG
only for real disconnection") causes that RTL8152_UNPLUG
is not always set when calling rtl8152_disconnect().
Therefore, I have to revert commit 0ee1f4734967 ("r8152:
napi hangup fix after disconnect"), first. And submit
another patch to fix it.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/usb/r8152.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index eee0f5007ee3..ad3abe26b51b 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4021,8 +4021,7 @@ static int rtl8152_close(struct net_device *netdev)
 #ifdef CONFIG_PM_SLEEP
 	unregister_pm_notifier(&tp->pm_notifier);
 #endif
-	if (!test_bit(RTL8152_UNPLUG, &tp->flags))
-		napi_disable(&tp->napi);
+	napi_disable(&tp->napi);
 	clear_bit(WORK_ENABLE, &tp->flags);
 	usb_kill_urb(tp->intr_urb);
 	cancel_delayed_work_sync(&tp->schedule);
-- 
2.21.0


  reply	other threads:[~2019-08-28  1:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23  8:53 [PATCH net 0/2] r8152: fix side effect Hayes Wang
2019-08-23  8:53 ` [PATCH net 1/2] Revert "r8152: napi hangup fix after disconnect" Hayes Wang
2019-08-23  8:53 ` [PATCH net 2/2] r8152: avoid using napi_disable after netif_napi_del Hayes Wang
2019-08-23 21:33   ` David Miller
2019-08-28  1:51 ` [PATCH net v3 0/2] r8152: fix side effect Hayes Wang
2019-08-28  1:51   ` Hayes Wang [this message]
2019-08-28  1:51   ` [PATCH net v3 2/2] r8152: remove calling netif_napi_del Hayes Wang
2019-08-28  4:17   ` [PATCH net v3 0/2] r8152: fix side effect Jakub Kicinski
2019-08-28 23:02   ` David Miller
2019-08-28 12:56 ` [PATCH net v4 " Hayes Wang
2019-08-28 12:56   ` [PATCH net v4 1/2] Revert "r8152: napi hangup fix after disconnect" Hayes Wang
2019-08-28 12:56   ` [PATCH net v4 2/2] r8152: remove calling netif_napi_del Hayes Wang
2019-08-28 23:17   ` [PATCH net v4 0/2] r8152: fix side effect David Miller
2019-08-29  1:08     ` Hayes Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394712342-15778-321-Taiwan-albertk@realtek.com \
    --to=hayeswang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).