From: Bastien Philbert <bastienphilbert@gmail.com>
To: sathya.prakash@broadcom.com
Cc: chaitra.basappa@broadcom.com,
suganath-prabu.subramani@broadcom.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com, MPT-FusionLinux.pdl@broadcom.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mpt3sas:Make sure mpt3sas adapter has been reset in scsih_resume
Date: Tue, 5 Apr 2016 19:37:11 -0400 [thread overview]
Message-ID: <1459899431-22564-1-git-send-email-bastienphilbert@gmail.com> (raw)
This fixes the issue in the function scih_resume that we assume
that the mpt3sas adapter has been reset properly with a call to
mpt3sas_base_hard_reset_handler by checking if this function
call returns a error code and exit adpater resume prematurely
Signed-off-by: Bastien Philbert <bastienphilbert@gmail.com>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index e0e4920..be2a7c3 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -8892,7 +8892,11 @@ scsih_resume(struct pci_dev *pdev)
if (r)
return r;
- mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET);
+ r = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET);
+ if (r) {
+ mpt3sas_base_free_resources(ioc);
+ return r;
+ }
scsi_unblock_requests(shost);
mpt3sas_base_start_watchdog(ioc);
return 0;
--
2.5.0
reply other threads:[~2016-04-05 23:37 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=1459899431-22564-1-git-send-email-bastienphilbert@gmail.com \
--to=bastienphilbert@gmail.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.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).