diff options
author | Don Brace <don.brace@pmcs.com> | 2015-01-23 17:44:24 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 12:57:42 -0500 |
commit | e345893bd4a8b0a9383a9ce9ff06034da103ad14 (patch) | |
tree | b5fa8cceaf8a0fbe69f0cdef4ff070a9df23fac9 /drivers/scsi/hpsa.c | |
parent | 407863cb9daddd99000c70cffb7013f47f67b29c (diff) |
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 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 7 |
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) | |||
4343 | h = sdev_to_hba(scsicmd->device); | 4343 | h = sdev_to_hba(scsicmd->device); |
4344 | if (h == NULL) /* paranoia */ | 4344 | if (h == NULL) /* paranoia */ |
4345 | return FAILED; | 4345 | return FAILED; |
4346 | |||
4347 | if (lockup_detected(h)) | ||
4348 | return FAILED; | ||
4349 | |||
4346 | dev = scsicmd->device->hostdata; | 4350 | dev = scsicmd->device->hostdata; |
4347 | if (!dev) { | 4351 | if (!dev) { |
4348 | dev_err(&h->pdev->dev, "hpsa_eh_device_reset_handler: " | 4352 | dev_err(&h->pdev->dev, "hpsa_eh_device_reset_handler: " |
@@ -4566,6 +4570,9 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc) | |||
4566 | "ABORT REQUEST FAILED, Controller lookup failed.\n")) | 4570 | "ABORT REQUEST FAILED, Controller lookup failed.\n")) |
4567 | return FAILED; | 4571 | return FAILED; |
4568 | 4572 | ||
4573 | if (lockup_detected(h)) | ||
4574 | return FAILED; | ||
4575 | |||
4569 | /* Check that controller supports some kind of task abort */ | 4576 | /* Check that controller supports some kind of task abort */ |
4570 | if (!(HPSATMF_PHYS_TASK_ABORT & h->TMFSupportFlags) && | 4577 | if (!(HPSATMF_PHYS_TASK_ABORT & h->TMFSupportFlags) && |
4571 | !(HPSATMF_LOG_TASK_ABORT & h->TMFSupportFlags)) | 4578 | !(HPSATMF_LOG_TASK_ABORT & h->TMFSupportFlags)) |