netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Auke Kok <auke-jan.h.kok@intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: NetDev <netdev@vger.kernel.org>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	"Ronciak, John" <john.ronciak@intel.com>,
	vvs@sw.ru, Jeff Garzik <jgarzik@pobox.com>
Subject: [PATCH]: e1000: error out if we cannot enable PCI device on resume
Date: Mon, 21 Aug 2006 14:33:34 -0700	[thread overview]
Message-ID: <44EA26AE.4020304@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]


FYI, in light of the recent error handling patches. I'll stack the outstanding 
list submitted by Vasily Averin to our git repository for submission to #upstream.

Cheers,

Auke

---

  e1000_main.c |    7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
---


[-- Attachment #2: e1000_trap_error_on_resume.patch --]
[-- Type: text/x-patch, Size: 890 bytes --]


e1000: error out if we cannot enable PCI device on resume

Do not ignore errors returned by pci_enable_device, instead error out.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 815abe5..7805d7f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4695,11 +4695,14 @@ e1000_resume(struct pci_dev *pdev)
 {
 	struct net_device *netdev = pci_get_drvdata(pdev);
 	struct e1000_adapter *adapter = netdev_priv(netdev);
-	uint32_t manc, ret_val;
+	uint32_t manc, err;
 
 	pci_set_power_state(pdev, PCI_D0);
 	e1000_pci_restore_state(adapter);
-	ret_val = pci_enable_device(pdev);
+	if ((err = pci_enable_device(pdev))) {
+		printk(KERN_ERR "e1000: Cannot enable PCI device from suspend\n");
+		return err;
+	}
 	pci_set_master(pdev);
 
 	pci_enable_wake(pdev, PCI_D3hot, 0);

                 reply	other threads:[~2006-08-21 21:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44EA26AE.4020304@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=akpm@osdl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=vvs@sw.ru \
    /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).