netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net 1/8] igb: Update queue reinit function to call dev_close when init of queues fails
Date: Wed, 27 Nov 2013 23:35:55 -0800	[thread overview]
Message-ID: <1385624162-10116-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1385624162-10116-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch adds a call to dev_close if the queue reinit fails in order
to make clearer to the user that the device is down.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 025e5f4..5a64aa6 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7846,6 +7846,7 @@ int igb_reinit_queues(struct igb_adapter *adapter)
 
 	if (igb_init_interrupt_scheme(adapter, true)) {
 		dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
+		dev_close(netdev);
 		return -ENOMEM;
 	}
 
-- 
1.8.3.1

  reply	other threads:[~2013-11-28  7:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28  7:35 [net 0/8][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-11-28  7:35 ` Jeff Kirsher [this message]
2013-11-29 20:47   ` [net 1/8] igb: Update queue reinit function to call dev_close when init of queues fails David Miller
2013-11-30  7:52     ` Jeff Kirsher
2013-12-02 16:55     ` Wyborny, Carolyn
2013-12-02 17:18       ` Ben Hutchings
2013-12-02 17:39         ` Wyborny, Carolyn
2013-12-02 18:33         ` David Miller
2013-11-28  7:35 ` [net 2/8] igb: Fixed Wake On LAN support Jeff Kirsher
2013-11-28  7:35 ` [net 3/8] e1000: prevent oops when adapter is being closed and reset simultaneously Jeff Kirsher
2013-11-28  7:35 ` [net 4/8] e1000: fix lockdep warning in e1000_reset_task Jeff Kirsher
2013-11-28  7:35 ` [net 5/8] e1000: fix possible reset_task running after adapter down Jeff Kirsher
2013-11-28  7:36 ` [net 6/8] ixgbe: ixgbe_fwd_ring_down needs to be static Jeff Kirsher
2013-11-28  7:36 ` [net 7/8] ixgbe: turn NETIF_F_HW_L2FW_DOFFLOAD off by default Jeff Kirsher
2013-11-28  7:36 ` [net 8/8] ixgbe: Make ixgbe_identify_qsfp_module_generic static Jeff Kirsher

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=1385624162-10116-2-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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).