Commit 49ccf84d authored by Mark Haverkamp's avatar Mark Haverkamp Committed by James Bottomley

[PATCH] aacraid reset handler update

This is an update from the Adaptec version of the driver to the aacraid
reset handler.  The current code has a logic error that is fixed by this
version.  This builds against 2.6.5-rc1.
parent 638127e5
......@@ -371,15 +371,22 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
* target (block maximum 60 seconds).
*/
for (count = 60; count; --count) {
int active = 0;
__shost_for_each_device(dev, host) {
spin_lock_irqsave(&dev->list_lock, flags);
list_for_each_entry(command, &dev->cmd_list, list) {
if (command->serial_number) {
spin_unlock_irqrestore(&dev->list_lock, flags);
return SUCCESS;
active++;
break;
}
}
spin_unlock_irqrestore(&dev->list_lock, flags);
/*
* We can exit If all the commands are complete
*/
if (active == 0)
return SUCCESS;
}
spin_unlock_irq(host->host_lock);
scsi_sleep(HZ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment