* [PATCH] r8169: call netif_napi_del at errpaths and at driver unload
@ 2012-05-31 11:51 Devendra Naga
2012-06-01 18:25 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Devendra Naga @ 2012-05-31 11:51 UTC (permalink / raw)
To: Francois Romieu, netdev, linux-kernel; +Cc: Devendra Naga
when register_netdev fails, the init'ed NAPIs by netif_napi_add must be
deleted with netif_napi_del, and also when driver unloads, it should
delete the NAPI before unregistering netdevice using unregister_netdev.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 00b4f56..9757ce3 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6345,6 +6345,8 @@ static void __devexit rtl_remove_one(struct pci_dev *pdev)
cancel_work_sync(&tp->wk.work);
+ netif_napi_del(&tp->napi);
+
unregister_netdev(dev);
rtl_release_firmware(tp);
@@ -6668,6 +6670,7 @@ out:
return rc;
err_out_msi_4:
+ netif_napi_del(&tp->napi);
rtl_disable_msi(pdev, tp);
iounmap(ioaddr);
err_out_free_res_3:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] r8169: call netif_napi_del at errpaths and at driver unload
2012-05-31 11:51 [PATCH] r8169: call netif_napi_del at errpaths and at driver unload Devendra Naga
@ 2012-06-01 18:25 ` David Miller
2012-06-01 19:29 ` Francois Romieu
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2012-06-01 18:25 UTC (permalink / raw)
To: devendra.aaru; +Cc: romieu, netdev, linux-kernel
From: Devendra Naga <devendra.aaru@gmail.com>
Date: Thu, 31 May 2012 17:21:20 +0530
> when register_netdev fails, the init'ed NAPIs by netif_napi_add must be
> deleted with netif_napi_del, and also when driver unloads, it should
> delete the NAPI before unregistering netdevice using unregister_netdev.
>
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Francois, I'm assuming you will merge this to me after you've
done some testing.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] r8169: call netif_napi_del at errpaths and at driver unload
2012-06-01 18:25 ` David Miller
@ 2012-06-01 19:29 ` Francois Romieu
2012-06-01 22:44 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Francois Romieu @ 2012-06-01 19:29 UTC (permalink / raw)
To: David Miller; +Cc: devendra.aaru, netdev, linux-kernel
David Miller <davem@davemloft.net> :
[...]
> Francois, I'm assuming you will merge this to me after you've
> done some testing.
You can apply it directly.
I have done several loops both with a forced error patch and the normal
removal of the module without problem. No trivial crash. Four 816x network
adapters. Reference one still comes up.
--
Ueimor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] r8169: call netif_napi_del at errpaths and at driver unload
2012-06-01 19:29 ` Francois Romieu
@ 2012-06-01 22:44 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-06-01 22:44 UTC (permalink / raw)
To: romieu; +Cc: devendra.aaru, netdev, linux-kernel
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Fri, 1 Jun 2012 21:29:44 +0200
> David Miller <davem@davemloft.net> :
> [...]
>> Francois, I'm assuming you will merge this to me after you've
>> done some testing.
>
> You can apply it directly.
>
> I have done several loops both with a forced error patch and the normal
> removal of the module without problem. No trivial crash. Four 816x network
> adapters. Reference one still comes up.
Ok, applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-01 22:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 11:51 [PATCH] r8169: call netif_napi_del at errpaths and at driver unload Devendra Naga
2012-06-01 18:25 ` David Miller
2012-06-01 19:29 ` Francois Romieu
2012-06-01 22:44 ` David Miller
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).