From: Jia-Ju Bai <baijiaju1990@163.com>
To: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Cc: e1000-devel@lists.sourceforge.net, linux.nics@intel.com,
sergei.shtylyov@cogentembedded.com,
Linux-nics@isotope.jf.intel.com
Subject: [PATCH V2] e1000: Add netif_napi_del in the normal path and error path to match netif_napi_add
Date: Sun, 21 Dec 2014 08:52:54 +0800 [thread overview]
Message-ID: <549619E6.8070503@163.com> (raw)
In-Reply-To: <20141220.143005.1130435723139487537.davem@davemloft.net>
Th driver lacks netif_napi_del in the normal path and error path to match the call of netif_napi_add in e1000_probe.
This patch fixes this problem, and it has been tested in runtime.
Signed-off-by: Jia-Ju Bai<baijiaju1990@163.com>
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +-
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 24f3986..f6def7b 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -1004,7 +1004,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* make ready for any if (hw->...) below */
err = e1000_init_hw_struct(adapter, hw);
if (err)
- goto err_sw_init;
+ goto err_dma;
/* there is a workaround being applied below that limits
* 64-bit DMA addresses to 64-bit hardware. There are some
@@ -1239,8 +1239,9 @@ err_eeprom:
iounmap(hw->flash_address);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
-err_dma:
err_sw_init:
+ netif_napi_del(&adapter->napi);
+err_dma:
err_mdio_ioremap:
iounmap(hw->ce4100_gbe_mdio_base_virt);
iounmap(hw->hw_addr);
@@ -1271,6 +1272,7 @@ static void e1000_remove(struct pci_dev *pdev)
e1000_down_and_stop(adapter);
e1000_release_manageability(adapter);
+ netif_napi_del(&adapter->napi);
unregister_netdev(netdev);
e1000_phy_hw_reset(hw);
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2014-12-21 0:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 14:32 [PATCH] e100 in linux-3.18.0: some potential bugs Jia-Ju Bai
2014-12-20 15:07 ` Sergei Shtylyov
2014-12-20 19:30 ` David Miller
2014-12-21 0:52 ` Jia-Ju Bai [this message]
2014-12-21 13:57 ` [PATCH V2] e1000: Add netif_napi_del in the normal path and error path to match netif_napi_add Sergei Shtylyov
2014-12-21 1:19 ` [PATCH V2 1/2] e100 in linux-3.18.0: Fix null pointer deference in e100_probe Jia-Ju Bai
2014-12-21 14:02 ` Sergei Shtylyov
2014-12-21 1:51 ` [PATCH V2 2/2] e100 in linux-3.18.0: Add netif_napi_del in the normal path and error path to match netif_napi_add Jia-Ju Bai
-- strict thread matches above, loose matches on Subject: below --
2014-12-21 15:15 [PATCH v2] e1000: " Jia-Ju Bai
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=549619E6.8070503@163.com \
--to=baijiaju1990@163.com \
--cc=Linux-nics@isotope.jf.intel.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=linux.nics@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.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).