summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2007-10-30 15:50:49 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 18:22:39 -0600
commitf858317d894a22eb2c26edcd26c7060fc4f40a15 (patch)
tree811c79ed70d994ac25876769e53a60bcce4224d5 /drivers/scsi/aacraid/linit.c
parent9e0fe44ddb9ed037188ac711af1e981ac32d3c32 (diff)
[SCSI] aacraid: forced reset override
Some of our vendors have requested that our adapters ignore the hardware reset attempts during recovery and have enforced this with changes in Adapter Firmware. Some of our customers have requested the option to be able to reset the adapter under adverse adapter failure, we even had a few defects reported here considering it a regression that the Adapter could not be reset. This patch addresses this dichotomy. The user can force the adapter to be reset if it supports the IOP_RESET_ALWAYS command, in cases where the adapter has been programmed to ignore the reset, by setting the aacraid.check_reset parameter to a value of -1. The driver will not reset an Adapter that does not support the reset command(s). This patch also fixes and cleans up some of the logic associated with resetting the adapter. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 9dd331bc29b..b4c9ff1b085 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -584,8 +584,11 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
* support a register, instead of a commanded, reset.
*/
if ((aac->supplement_adapter_info.SupportedOptions2 &
- le32_to_cpu(AAC_OPTION_MU_RESET|AAC_OPTION_IGNORE_RESET)) ==
- le32_to_cpu(AAC_OPTION_MU_RESET))
+ le32_to_cpu(AAC_OPTION_MU_RESET)) &&
+ aac_check_reset &&
+ ((aac_check_reset != 1) ||
+ (aac->supplement_adapter_info.SupportedOptions2 &
+ le32_to_cpu(AAC_OPTION_IGNORE_RESET))))
aac_reset_adapter(aac, 2); /* Bypass wait for command quiesce */
return SUCCESS; /* Cause an immediate retry of the command with a ten second delay after successful tur */
}