* [PATCH 3/5] fixing errors handling during pci_driver resume stage [fusion]
@ 2007-01-09 9:01 Dmitriy Monakhov
0 siblings, 0 replies; only message in thread
From: Dmitriy Monakhov @ 2007-01-09 9:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, devel, linux-pci, netdev, linux-scsi
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
fusion pci drivers have to return correct error code during resume stage in
case of errors.
Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
-----
[-- Attachment #2: diff-pci-fusion --]
[-- Type: text/plain, Size: 1301 bytes --]
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 6e068cf..51a3621 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1524,7 +1524,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, err;
printk(MYIOC_s_INFO_FMT
"pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n",
@@ -1532,7 +1532,11 @@ mpt_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, 0);
pci_restore_state(pdev);
- pci_enable_device(pdev);
+ err = pci_enable_device(pdev);
+ if (err) {
+ dev_err(&pdev->dev, "Cannot enable PCI device, aborting.\n");
+ return err;
+ }
/* enable interrupts */
CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM);
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 2c72c36..5324866 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -1120,8 +1120,10 @@ mptscsih_resume(struct pci_dev *pdev)
MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
struct Scsi_Host *host = ioc->sh;
MPT_SCSI_HOST *hd;
+ int err;
- mpt_resume(pdev);
+ if ((err = mpt_resume(pdev)))
+ return err;
if(!host)
return 0;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-09 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 9:01 [PATCH 3/5] fixing errors handling during pci_driver resume stage [fusion] Dmitriy Monakhov
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).