diff options
author | Salyzyn, Mark <mark_salyzyn@adaptec.com> | 2007-10-30 15:50:49 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:22:39 -0500 |
commit | f858317d894a22eb2c26edcd26c7060fc4f40a15 (patch) | |
tree | 811c79ed70d994ac25876769e53a60bcce4224d5 /drivers/scsi/aacraid/aachba.c | |
parent | 9e0fe44ddb9ed037188ac711af1e981ac32d3c32 (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/aachba.c')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index a77ab8d693d4..ad8912cbe6e7 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -179,7 +179,7 @@ MODULE_PARM_DESC(check_interval, "Interval in seconds between adapter health che | |||
179 | 179 | ||
180 | int aac_check_reset = 1; | 180 | int aac_check_reset = 1; |
181 | module_param_named(check_reset, aac_check_reset, int, S_IRUGO|S_IWUSR); | 181 | module_param_named(check_reset, aac_check_reset, int, S_IRUGO|S_IWUSR); |
182 | MODULE_PARM_DESC(aac_check_reset, "If adapter fails health check, reset the adapter."); | 182 | MODULE_PARM_DESC(aac_check_reset, "If adapter fails health check, reset the adapter. a value of -1 forces the reset to adapters programmed to ignore it."); |
183 | 183 | ||
184 | int expose_physicals = -1; | 184 | int expose_physicals = -1; |
185 | module_param(expose_physicals, int, S_IRUGO|S_IWUSR); | 185 | module_param(expose_physicals, int, S_IRUGO|S_IWUSR); |
@@ -1305,9 +1305,9 @@ int aac_get_adapter_info(struct aac_dev* dev) | |||
1305 | (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid), | 1305 | (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid), |
1306 | dev->supplement_adapter_info.VpdInfo.Tsid); | 1306 | dev->supplement_adapter_info.VpdInfo.Tsid); |
1307 | } | 1307 | } |
1308 | if (!aac_check_reset || | 1308 | if (!aac_check_reset || ((aac_check_reset != 1) && |
1309 | (dev->supplement_adapter_info.SupportedOptions2 & | 1309 | (dev->supplement_adapter_info.SupportedOptions2 & |
1310 | le32_to_cpu(AAC_OPTION_IGNORE_RESET))) { | 1310 | le32_to_cpu(AAC_OPTION_IGNORE_RESET)))) { |
1311 | printk(KERN_INFO "%s%d: Reset Adapter Ignored\n", | 1311 | printk(KERN_INFO "%s%d: Reset Adapter Ignored\n", |
1312 | dev->name, dev->id); | 1312 | dev->name, dev->id); |
1313 | } | 1313 | } |
@@ -1798,7 +1798,7 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd) | |||
1798 | if (active) | 1798 | if (active) |
1799 | return SCSI_MLQUEUE_DEVICE_BUSY; | 1799 | return SCSI_MLQUEUE_DEVICE_BUSY; |
1800 | 1800 | ||
1801 | aac = (struct aac_dev *)scsicmd->device->host->hostdata; | 1801 | aac = (struct aac_dev *)sdev->host->hostdata; |
1802 | if (aac->in_reset) | 1802 | if (aac->in_reset) |
1803 | return SCSI_MLQUEUE_HOST_BUSY; | 1803 | return SCSI_MLQUEUE_HOST_BUSY; |
1804 | 1804 | ||