aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorDon Brace <don.brace@pmcs.com>2015-01-23 16:44:24 -0600
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 09:57:42 -0800
commite345893bd4a8b0a9383a9ce9ff06034da103ad14 (patch)
treeb5fa8cceaf8a0fbe69f0cdef4ff070a9df23fac9 /drivers/scsi/hpsa.c
parenthpsa: check for ctlr lockup after command allocation in main io path (diff)
downloadlinux-dev-e345893bd4a8b0a9383a9ce9ff06034da103ad14.tar.xz
linux-dev-e345893bd4a8b0a9383a9ce9ff06034da103ad14.zip
hpsa: return failed from device reset/abort handlers
Returning failed from the device reset handler will get the device kicked offline, which is fine if the controller is locked up anyhow. Cannot abort a command from a failed controller. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Reviewed-by: Justin Lindley <justin.lindley@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/hpsa.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 834ac78c51a3..a02ea7f43d67 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4343,6 +4343,10 @@ static int hpsa_eh_device_reset_handler(struct scsi_cmnd *scsicmd)
h = sdev_to_hba(scsicmd->device);
if (h == NULL) /* paranoia */
return FAILED;
+
+ if (lockup_detected(h))
+ return FAILED;
+
dev = scsicmd->device->hostdata;
if (!dev) {
dev_err(&h->pdev->dev, "hpsa_eh_device_reset_handler: "
@@ -4566,6 +4570,9 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc)
"ABORT REQUEST FAILED, Controller lookup failed.\n"))
return FAILED;
+ if (lockup_detected(h))
+ return FAILED;
+
/* Check that controller supports some kind of task abort */
if (!(HPSATMF_PHYS_TASK_ABORT & h->TMFSupportFlags) &&
!(HPSATMF_LOG_TASK_ABORT & h->TMFSupportFlags))