mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hayes Wang <hayeswang@realtek.com>
To: Jiri Slaby <jslaby@suse.cz>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: nic_swsd <nic_swsd@realtek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH net v2 1/2] Revert "r8152: napi hangup fix after disconnect"
Date: Mon, 26 Aug 2019 09:43:32 +0000	[thread overview]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2F18D6733@RTITMBSVM03.realtek.com.tw> (raw)
In-Reply-To: <1f707377-7b61-4ba1-62bf-f275d0360749@suse.cz>

Jiri Slaby [mailto:jslaby@suse.cz]
> Sent: Monday, August 26, 2019 4:55 PM
[...]
> Could you clarify *why* it conflicts? And how is the problem fixed by
> 0ee1f473496 avoided now?

In rtl8152_disconnect(), the flow would be as following.

static void rtl8152_disconnect(struct usb_interface *intf)
{
	...
	- netif_napi_del(&tp->napi);
	- unregister_netdev(tp->netdev);
	   - rtl8152_close
	      - napi_disable

Therefore you add a checking of RTL8152_UNPLUG to avoid
calling napi_disable() after netif_napi_del(). However,
after commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG
only for real disconnection"), RTL8152_UNPLUG is not
always set when calling rtl8152_disconnect(). That is,
napi_disable() would be called after netif_napi_del(),
if RTL8152_UNPLUG is not set.

The best way is to avoid calling netif_napi_del() before
calling unregister_netdev(). And I has submitted such
patch following this one.

Best Regards,
Hayes



  reply	other threads:[~2019-08-26  9:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  8:41 [PATCH net v2 0/2] r8152: fix side effect Hayes Wang
2019-08-26  8:41 ` [PATCH net v2 1/2] Revert "r8152: napi hangup fix after disconnect" Hayes Wang
2019-08-26  8:55   ` Jiri Slaby
2019-08-26  9:43     ` Hayes Wang [this message]
2019-08-26 20:55       ` David Miller
2019-08-26  8:41 ` [PATCH net v2 2/2] r8152: remove calling netif_napi_del 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=0835B3720019904CB8F7AA43166CEEB2F18D6733@RTITMBSVM03.realtek.com.tw \
    --to=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

all inboxes | Powered by JetHome®