[SCSI] allow sleeping in ->eh_host_reset_handler()
[pandora-kernel.git] / drivers / scsi / aacraid / linit.c
index b488434..f7e9c89 100644 (file)
@@ -384,10 +384,13 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
                                        AAC_DRIVERNAME);
 
 
+       spin_lock_irq(host->host_lock);
+
        aac = (struct aac_dev *)host->hostdata;
        if (aac_adapter_check_health(aac)) {
                printk(KERN_ERR "%s: Host adapter appears dead\n", 
                                AAC_DRIVERNAME);
+               spin_unlock_irq(host->host_lock);
                return -ENODEV;
        }
        /*
@@ -418,6 +421,7 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
                ssleep(1);
                spin_lock_irq(host->host_lock);
        }
+       spin_unlock_irq(host->host_lock);
        printk(KERN_ERR "%s: SCSI bus appears hung\n", AAC_DRIVERNAME);
        return -ETIMEDOUT;
 }