aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2006-03-27 09:43:40 -0800
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-13 10:13:17 -0500
commit77d644d4d70c9ad5df51792575f43a950525c9aa (patch)
tree84dd02706a7554e26820ff98586844ad4e996d68 /drivers/scsi/aacraid/linit.c
parente5718774f12234c7c9be8944001cfd109ba955e1 (diff)
[SCSI] aacraid: Track command ownership in driver
Received from Mark Salyzyn The loss of the ownership flags, despite their flaws, in the scsi command were sorely missed and are reinstated more accurately in the aacraid driver to track commands and permit us to properly handle error recovery actions. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 72033077864..9f3cc7b7123 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -243,6 +243,7 @@ static struct aac_driver_ident aac_drivers[] = {
static int aac_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
{
cmd->scsi_done = done;
+ cmd->SCp.phase = AAC_OWNER_LOWLEVEL;
return (aac_scsi_cmd(cmd) ? FAILED : 0);
}
@@ -471,7 +472,8 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
__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) {
+ if ((command != cmd) &&
+ (command->SCp.phase == AAC_OWNER_FIRMWARE)) {
active++;
break;
}