Skip to content

Commit

Permalink
[SCSI] aic7xxx: reset handler selects a wrong command
Browse files Browse the repository at this point in the history
To transport scsi reset command to device aic7xxx reset handler looks
at the driver's pending_list and searches any proper command. However
the search condition has been inverted: ahc_match_scb() returns TRUE
if a matched command is found. As a result the reset on required
devices did not turn out well, a correctly working neighbour device
may be surprised by the reset. aic7xxx reset handler reports about the
success, but really the original situation is not corrected yet.

Signed-off-by: Vasily Averin <vvs@sw.ru>

Naturally, there's a corresponding problem in the aic79xx driver, so
I've also added the same fix for that.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Vasily Averin authored and James Bottomley committed Nov 28, 2005
1 parent 458af54 commit dce2006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/aic7xxx/aic79xx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
scmd_id(cmd),
scmd_channel(cmd) + 'A',
CAM_LUN_WILDCARD,
SCB_LIST_NULL, ROLE_INITIATOR) == 0)
SCB_LIST_NULL, ROLE_INITIATOR))
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/aic7xxx/aic7xxx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag)
if (ahc_match_scb(ahc, pending_scb, scmd_id(cmd),
scmd_channel(cmd) + 'A',
CAM_LUN_WILDCARD,
SCB_LIST_NULL, ROLE_INITIATOR) == 0)
SCB_LIST_NULL, ROLE_INITIATOR))
break;
}
}
Expand Down

0 comments on commit dce2006

Please sign in to comment.