]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/aacraid/linit.c
Merge HEAD from ../scsi-misc-2.6-old
[~andy/linux] / drivers / scsi / aacraid / linit.c
index 7a25dab48a9e34a44b2467822138ae3f357a1156..c235d0c0e7a7071b23bd105c2dca63667812fef3 100644 (file)
@@ -453,9 +453,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
                /*
                 * We can exit If all the commands are complete
                 */
+               spin_unlock_irq(host->host_lock);
                if (active == 0)
                        return SUCCESS;
-               spin_unlock_irq(host->host_lock);
                ssleep(1);
                spin_lock_irq(host->host_lock);
        }
@@ -748,7 +748,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
                unique_id++;
        }
 
-       if (pci_enable_device(pdev))
+       error = pci_enable_device(pdev);
+       if (error)
                goto out;
 
        if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 
@@ -772,6 +773,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
        shost->irq = pdev->irq;
        shost->base = pci_resource_start(pdev, 0);
        shost->unique_id = unique_id;
+       shost->max_cmd_len = 16;
 
        aac = (struct aac_dev *)shost->hostdata;
        aac->scsi_host_ptr = shost;     
@@ -799,7 +801,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
                        goto out_deinit;
  
        aac->maximum_num_channels = aac_drivers[index].channels;
-       aac_get_adapter_info(aac);
+       error = aac_get_adapter_info(aac);
+       if (error < 0)
+               goto out_deinit;
 
        /*
         * Lets override negotiations and drop the maximum SG limit to 34
@@ -927,8 +931,8 @@ static int __init aac_init(void)
        printk(KERN_INFO "Adaptec %s driver (%s)\n",
          AAC_DRIVERNAME, aac_driver_version);
 
-       error = pci_module_init(&aac_pci_driver);
-       if (error)
+       error = pci_register_driver(&aac_pci_driver);
+       if (error < 0)
                return error;
 
        aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops);