diff options
author | Mark Haverkamp <markh@osdl.org> | 2006-03-27 12:43:40 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 11:13:17 -0400 |
commit | 77d644d4d70c9ad5df51792575f43a950525c9aa (patch) | |
tree | 84dd02706a7554e26820ff98586844ad4e996d68 /drivers/scsi/aacraid/linit.c | |
parent | e5718774f12234c7c9be8944001cfd109ba955e1 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 720330778648..9f3cc7b7123d 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -243,6 +243,7 @@ static struct aac_driver_ident aac_drivers[] = { | |||
243 | static int aac_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | 243 | static int aac_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) |
244 | { | 244 | { |
245 | cmd->scsi_done = done; | 245 | cmd->scsi_done = done; |
246 | cmd->SCp.phase = AAC_OWNER_LOWLEVEL; | ||
246 | return (aac_scsi_cmd(cmd) ? FAILED : 0); | 247 | return (aac_scsi_cmd(cmd) ? FAILED : 0); |
247 | } | 248 | } |
248 | 249 | ||
@@ -471,7 +472,8 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) | |||
471 | __shost_for_each_device(dev, host) { | 472 | __shost_for_each_device(dev, host) { |
472 | spin_lock_irqsave(&dev->list_lock, flags); | 473 | spin_lock_irqsave(&dev->list_lock, flags); |
473 | list_for_each_entry(command, &dev->cmd_list, list) { | 474 | list_for_each_entry(command, &dev->cmd_list, list) { |
474 | if (command->serial_number) { | 475 | if ((command != cmd) && |
476 | (command->SCp.phase == AAC_OWNER_FIRMWARE)) { | ||
475 | active++; | 477 | active++; |
476 | break; | 478 | break; |
477 | } | 479 | } |