[SCSI] aacraid: ignore adapter reset check polarity
authorSalyzyn, Mark <Mark_Salyzyn@adaptec.com>
Fri, 8 Feb 2008 16:36:23 +0000 (08:36 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 11 Feb 2008 16:20:54 +0000 (10:20 -0600)
The Adapter's Ignore Reset flag and insmod parameter boolean polarity
is incorrect in the driver.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/commsup.c
drivers/scsi/aacraid/linit.c

index f8d2ae301283fd8bbba71be75a3ea41c0d5c20b3..c05092fd3a9dff7bfb3197639d0b5908b6a3d5b0 100644 (file)
@@ -1341,7 +1341,7 @@ int aac_get_adapter_info(struct aac_dev* dev)
                          (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid),
                          dev->supplement_adapter_info.VpdInfo.Tsid);
                }
                          (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid),
                          dev->supplement_adapter_info.VpdInfo.Tsid);
                }
-               if (!aac_check_reset || ((aac_check_reset != 1) &&
+               if (!aac_check_reset || ((aac_check_reset == 1) &&
                  (dev->supplement_adapter_info.SupportedOptions2 &
                  AAC_OPTION_IGNORE_RESET))) {
                        printk(KERN_INFO "%s%d: Reset Adapter Ignored\n",
                  (dev->supplement_adapter_info.SupportedOptions2 &
                  AAC_OPTION_IGNORE_RESET))) {
                        printk(KERN_INFO "%s%d: Reset Adapter Ignored\n",
@@ -1379,13 +1379,14 @@ int aac_get_adapter_info(struct aac_dev* dev)
 
        if (nondasd != -1)
                dev->nondasd_support = (nondasd!=0);
 
        if (nondasd != -1)
                dev->nondasd_support = (nondasd!=0);
-       if(dev->nondasd_support != 0) {
+       if (dev->nondasd_support && !dev->in_reset)
                printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id);
                printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id);
-       }
 
        dev->dac_support = 0;
        if( (sizeof(dma_addr_t) > 4) && (dev->adapter_info.options & AAC_OPT_SGMAP_HOST64)){
 
        dev->dac_support = 0;
        if( (sizeof(dma_addr_t) > 4) && (dev->adapter_info.options & AAC_OPT_SGMAP_HOST64)){
-               printk(KERN_INFO "%s%d: 64bit support enabled.\n", dev->name, dev->id);
+               if (!dev->in_reset)
+                       printk(KERN_INFO "%s%d: 64bit support enabled.\n",
+                               dev->name, dev->id);
                dev->dac_support = 1;
        }
 
                dev->dac_support = 1;
        }
 
@@ -1395,8 +1396,9 @@ int aac_get_adapter_info(struct aac_dev* dev)
        if(dev->dac_support != 0) {
                if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) &&
                        !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) {
        if(dev->dac_support != 0) {
                if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) &&
                        !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) {
-                       printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n",
-                               dev->name, dev->id);
+                       if (!dev->in_reset)
+                               printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n",
+                                       dev->name, dev->id);
                } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) &&
                        !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) {
                        printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n",
                } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) &&
                        !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) {
                        printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n",
index 81b36923e0ef487726715660035e25f176d44432..47434499e82bc3704e74252d0913e52bd5ed1e6e 100644 (file)
@@ -1458,7 +1458,7 @@ int aac_check_health(struct aac_dev * aac)
 
        printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED);
 
 
        printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED);
 
-       if (!aac_check_reset || ((aac_check_reset != 1) &&
+       if (!aac_check_reset || ((aac_check_reset == 1) &&
                (aac->supplement_adapter_info.SupportedOptions2 &
                        AAC_OPTION_IGNORE_RESET)))
                goto out;
                (aac->supplement_adapter_info.SupportedOptions2 &
                        AAC_OPTION_IGNORE_RESET)))
                goto out;
index 7232e7326ded39f196ba6ab183a7f09a65917727..fdfbad0903fdf30945175719574109dcea12f8dd 100644 (file)
@@ -641,7 +641,7 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
           AAC_OPTION_MU_RESET) &&
          aac_check_reset &&
          ((aac_check_reset != 1) ||
           AAC_OPTION_MU_RESET) &&
          aac_check_reset &&
          ((aac_check_reset != 1) ||
-          (aac->supplement_adapter_info.SupportedOptions2 &
+          !(aac->supplement_adapter_info.SupportedOptions2 &
            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 */
            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 */