From: Jeff Garzik <jeff@garzik.org>
To: Eric.Moore@lsil.com, linux-scsi@vger.kernel.org,
Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] MPT fusion: handle PCI layer error on resume
Date: Wed, 11 Oct 2006 17:38:34 -0400 [thread overview]
Message-ID: <20061011213834.GA20253@havoc.gtf.org> (raw)
In the unlikely event of pci_enable_device() failure during resume, we
do the minimalist solution and simply exit, rather than continuing to
enable the hardware.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
---
drivers/message/fusion/mptbase.c | 10 ++++++++--
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index e5c7271..f183b83 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1515,7 +1515,7 @@ mpt_resume(struct pci_dev *pdev)
{
MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
u32 device_state = pdev->current_state;
- int recovery_state;
+ int recovery_state, rc;
printk(MYIOC_s_INFO_FMT
"pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n",
@@ -1523,7 +1523,13 @@ mpt_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
- pci_enable_device(pdev);
+
+ rc = pci_enable_device(pdev);
+ if (rc) {
+ printk(MYIOC_s_INFO_FMT
+ "pci-resume: device enable failed\n", ioc->name);
+ return rc;
+ }
/* enable interrupts */
CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM);
reply other threads:[~2006-10-11 21:38 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=20061011213834.GA20253@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=Eric.Moore@lsil.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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
all inboxes | Powered by JetHome®