diff options
author | Sumit.Saxena@lsi.com <Sumit.Saxena@lsi.com> | 2013-05-22 02:59:28 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-24 19:55:17 -0400 |
commit | b09e66da3f5d9c47336dfe63f1e76696931fbdb0 (patch) | |
tree | d4eaf9fc26a7d4e1244acbdf04e990ae2b2ee50b /drivers/scsi/megaraid | |
parent | 28ce280fe46f0ba90c7df26d9fa5ba21a2e8a6bc (diff) |
[SCSI] megaraid_sas: Return DID_ERROR for SCSI IO, when controller is in critical h/w error
Do not return SCSI_MLQUEUE_HOST_BUSY, but send DID_ERROR to SCSI mid-layer, if
adapter is in critical error state. "SCSI_MLQUEUE_HOST_BUSY" will keep same
SCSI command in loop and it is not a right return value, if controller is
hardware critical error.
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 3a9ddae86f1f..cd2ee473f08d 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -1471,6 +1471,14 @@ megasas_queue_command_lck(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd | |||
1471 | return SCSI_MLQUEUE_HOST_BUSY; | 1471 | return SCSI_MLQUEUE_HOST_BUSY; |
1472 | 1472 | ||
1473 | spin_lock_irqsave(&instance->hba_lock, flags); | 1473 | spin_lock_irqsave(&instance->hba_lock, flags); |
1474 | |||
1475 | if (instance->adprecovery == MEGASAS_HW_CRITICAL_ERROR) { | ||
1476 | spin_unlock_irqrestore(&instance->hba_lock, flags); | ||
1477 | scmd->result = DID_ERROR << 16; | ||
1478 | done(scmd); | ||
1479 | return 0; | ||
1480 | } | ||
1481 | |||
1474 | if (instance->adprecovery != MEGASAS_HBA_OPERATIONAL) { | 1482 | if (instance->adprecovery != MEGASAS_HBA_OPERATIONAL) { |
1475 | spin_unlock_irqrestore(&instance->hba_lock, flags); | 1483 | spin_unlock_irqrestore(&instance->hba_lock, flags); |
1476 | return SCSI_MLQUEUE_HOST_BUSY; | 1484 | return SCSI_MLQUEUE_HOST_BUSY; |