From: bradley.grove@gmail.com
To: linux-scsi@vger.kernel.org
Cc: JBottomley@parallels.com, xjtuwjp@gmail.com, ebrown@attotech.com,
pcullen@attotech.com, Bradley Grove <bgrove@attotech.com>
Subject: [PATCH] pm80xx: Fix hibernation issue
Date: Mon, 16 Jun 2014 15:30:11 -0400 [thread overview]
Message-ID: <1402947011-3642-1-git-send-email-bgrove@attotech.com> (raw)
From: Bradley Grove <bgrove@attotech.com>
During hibernation, the HBA firmware may lose power and forget the device
id info. This causes the HBA to reject IO upon resume. The fix is
to call the libsas power management routines to make the domain device
forgetful.
This patch also changes the value of pm8001_flags during resume to allow
completions to work.
This fixes bug 76681: https://bugzilla.kernel.org/show_bug.cgi?id=76681
Signed-off-by: Bradley Grove <bgrove@attotech.com>
---
drivers/scsi/pm8001/pm8001_init.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index c4f31b21..9f51a1f 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -957,6 +957,7 @@ static int pm8001_pci_suspend(struct pci_dev *pdev, pm_message_t state)
int i, j;
u32 device_state;
pm8001_ha = sha->lldd_ha;
+ sas_suspend_ha(sha);
flush_workqueue(pm8001_wq);
scsi_block_requests(pm8001_ha->shost);
if (!pdev->pm_cap) {
@@ -1026,7 +1027,7 @@ static int pm8001_pci_resume(struct pci_dev *pdev)
rc = pci_go_44(pdev);
if (rc)
goto err_out_disable;
-
+ sas_prep_resume_ha(sha);
/* chip soft rst only for spc */
if (pm8001_ha->chip_id == chip_8001) {
PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);
@@ -1058,7 +1059,12 @@ static int pm8001_pci_resume(struct pci_dev *pdev)
for (i = 1; i < pm8001_ha->number_of_intr; i++)
PM8001_CHIP_DISP->interrupt_enable(pm8001_ha, i);
}
+ pm8001_ha->flags = PM8001F_INIT_TIME;
scsi_unblock_requests(pm8001_ha->shost);
+ pm8001_scan_start(pm8001_ha->shost);
+ msleep(100);
+ sas_resume_ha(sha);
+ pm8001_ha->flags = PM8001F_RUN_TIME;
return 0;
err_out_disable:
--
1.9.3
next reply other threads:[~2014-06-16 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 19:30 bradley.grove [this message]
2014-06-17 0:04 ` [PATCH] pm80xx: Fix hibernation issue James Bottomley
2014-06-17 20:55 ` Bradley Grove
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=1402947011-3642-1-git-send-email-bgrove@attotech.com \
--to=bradley.grove@gmail.com \
--cc=JBottomley@parallels.com \
--cc=bgrove@attotech.com \
--cc=ebrown@attotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=pcullen@attotech.com \
--cc=xjtuwjp@gmail.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