aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commsup.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 19:22:39 -0500
commitf858317d894a22eb2c26edcd26c7060fc4f40a15 (patch)
tree811c79ed70d994ac25876769e53a60bcce4224d5 /drivers/scsi/aacraid/commsup.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/commsup.c')
-rw-r--r--drivers/scsi/aacraid/commsup.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index abce48ccc85b..cb9a92f894ab 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1217,12 +1217,13 @@ int aac_reset_adapter(struct aac_dev * aac, int forced)
1217 } 1217 }
1218 1218
1219 /* Quiesce build, flush cache, write through mode */ 1219 /* Quiesce build, flush cache, write through mode */
1220 aac_send_shutdown(aac); 1220 if (forced < 2)
1221 aac_send_shutdown(aac);
1221 spin_lock_irqsave(host->host_lock, flagv); 1222 spin_lock_irqsave(host->host_lock, flagv);
1222 retval = _aac_reset_adapter(aac, forced); 1223 retval = _aac_reset_adapter(aac, forced ? forced : ((aac_check_reset != 0) && (aac_check_reset != 1)));
1223 spin_unlock_irqrestore(host->host_lock, flagv); 1224 spin_unlock_irqrestore(host->host_lock, flagv);
1224 1225
1225 if (retval == -ENODEV) { 1226 if ((forced < 2) && (retval == -ENODEV)) {
1226 /* Unwind aac_send_shutdown() IOP_RESET unsupported/disabled */ 1227 /* Unwind aac_send_shutdown() IOP_RESET unsupported/disabled */
1227 struct fib * fibctx = aac_fib_alloc(aac); 1228 struct fib * fibctx = aac_fib_alloc(aac);
1228 if (fibctx) { 1229 if (fibctx) {
@@ -1372,14 +1373,14 @@ int aac_check_health(struct aac_dev * aac)
1372 1373
1373 printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED); 1374 printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED);
1374 1375
1375 if (!aac_check_reset || 1376 if (!aac_check_reset || ((aac_check_reset != 1) &&
1376 (aac->supplement_adapter_info.SupportedOptions2 & 1377 (aac->supplement_adapter_info.SupportedOptions2 &
1377 le32_to_cpu(AAC_OPTION_IGNORE_RESET))) 1378 le32_to_cpu(AAC_OPTION_IGNORE_RESET))))
1378 goto out; 1379 goto out;
1379 host = aac->scsi_host_ptr; 1380 host = aac->scsi_host_ptr;
1380 if (aac->thread->pid != current->pid) 1381 if (aac->thread->pid != current->pid)
1381 spin_lock_irqsave(host->host_lock, flagv); 1382 spin_lock_irqsave(host->host_lock, flagv);
1382 BlinkLED = _aac_reset_adapter(aac, 0); 1383 BlinkLED = _aac_reset_adapter(aac, aac_check_reset != 1);
1383 if (aac->thread->pid != current->pid) 1384 if (aac->thread->pid != current->pid)
1384 spin_unlock_irqrestore(host->host_lock, flagv); 1385 spin_unlock_irqrestore(host->host_lock, flagv);
1385 return BlinkLED; 1386 return BlinkLED;