From: David Miller <davem@davemloft.net>
To: hayeswang@realtek.com
Cc: netdev@vger.kernel.org, nic_swsd@realtek.com,
linux-kernel@vger.kernel.org, jslaby@suse.cz
Subject: Re: [PATCH net 2/2] r8152: avoid using napi_disable after netif_napi_del.
Date: Fri, 23 Aug 2019 14:33:50 -0700 (PDT) [thread overview]
Message-ID: <20190823.143350.122492125918705806.davem@davemloft.net> (raw)
In-Reply-To: <1394712342-15778-316-Taiwan-albertk@realtek.com>
From: Hayes Wang <hayeswang@realtek.com>
Date: Fri, 23 Aug 2019 16:53:02 +0800
> Exchange netif_napi_del() and unregister_netdev() in rtl8152_disconnect()
> to avoid using napi_disable() after netif_napi_del().
>
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>
> ---
> drivers/net/usb/r8152.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 690a24d1ef82..29390eda5251 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -5364,8 +5364,8 @@ static void rtl8152_disconnect(struct usb_interface *intf)
> if (tp) {
> rtl_set_unplug(tp);
>
> - netif_napi_del(&tp->napi);
> unregister_netdev(tp->netdev);
> + netif_napi_del(&tp->napi);
> cancel_delayed_work_sync(&tp->hw_phy_work);
> tp->rtl_ops.unload(tp);
> free_netdev(tp->netdev);
This is completely redundant because free_netdev() will perform all of
the necessary netif_napi_del() calls.
next prev parent reply other threads:[~2019-08-23 21:33 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 [this message]
2019-08-28 1:51 ` [PATCH net v3 0/2] r8152: fix side effect Hayes Wang
2019-08-28 1:51 ` [PATCH net v3 1/2] Revert "r8152: napi hangup fix after disconnect" Hayes Wang
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=20190823.143350.122492125918705806.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=jslaby@suse.cz \
--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).