From: Hayes Wang <hidden> Date: 2019-08-26 08:41:56
v2:
Replace patch #2 with "r8152: remove calling netif_napi_del".
v1:
The commit 0ee1f4734967 ("r8152: napi hangup fix after disconnect")
add a check to avoid using napi_disable after netif_napi_del. However,
the commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real
disconnection") let the check useless.
Therefore, I revert commit 0ee1f4734967 ("r8152: napi hangup fix
after disconnect") first, and add another patch to fix it.
Hayes Wang (2):
Revert "r8152: napi hangup fix after disconnect"
r8152: remove calling netif_napi_del
drivers/net/usb/r8152.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--
2.21.0
From: Hayes Wang <hidden> Date: 2019-08-26 08:41:53
This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5.
This conflicts with commit ffa9fec30ca0 ("r8152: set
RTL8152_UNPLUG only for real disconnection").
Signed-off-by: Hayes Wang <redacted>
---
drivers/net/usb/r8152.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Hayes Wang <hidden> Date: 2019-08-26 08:41:59
Remove unnecessary use of netif_napi_del. This also avoids to call
napi_disable() after netif_napi_del().
Signed-off-by: Hayes Wang <redacted>
---
drivers/net/usb/r8152.c | 2 --
1 file changed, 2 deletions(-)
This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5.
This conflicts with commit ffa9fec30ca0 ("r8152: set
RTL8152_UNPLUG only for real disconnection").
Could you clarify *why* it conflicts? And how is the problem fixed by
0ee1f473496 avoided now?
quoted hunk
Signed-off-by: Hayes Wang <redacted>
---
drivers/net/usb/r8152.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Hayes Wang <hidden> Date: 2019-08-26 09:43:40
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
From: David Miller <davem@davemloft.net> Date: 2019-08-26 20:55:55
From: Hayes Wang <redacted>
Date: Mon, 26 Aug 2019 09:43:32 +0000
Jiri Slaby [mailto:jslaby@suse.cz]
quoted
Sent: Monday, August 26, 2019 4:55 PM
[...]
quoted
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.
These details belong in the commit message, always.