diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-02-22 18:07:52 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-02-22 18:23:47 -0500 |
commit | 63e4563b9cf77875286312758f61a20f912afbbb (patch) | |
tree | 80a7d74e07f6788cb4c9a6eb2443f4590053eea5 /drivers/scsi | |
parent | 91b550604480eadcdadc7db8a7d19f496ccad6bd (diff) |
[SCSI] libsas: correctly flush the LU queue on error recovery
The current sas_scsi_clear_queue_lu() is wrongly checking for commands
which match the pointer to the one passed in. It should be checking for
commands which are on the same logical unit as the one passed in. Fix
this by checking target pointer and LUN for equality.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 9c96d1bd36e2..704ea06a6e50 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -280,7 +280,8 @@ static void sas_scsi_clear_queue_lu(struct list_head *error_q, struct scsi_cmnd | |||
280 | struct scsi_cmnd *cmd, *n; | 280 | struct scsi_cmnd *cmd, *n; |
281 | 281 | ||
282 | list_for_each_entry_safe(cmd, n, error_q, eh_entry) { | 282 | list_for_each_entry_safe(cmd, n, error_q, eh_entry) { |
283 | if (cmd == my_cmd) | 283 | if (cmd->device->sdev_target == my_cmd->device->sdev_target && |
284 | cmd->device->lun == my_cmd->device->lun) | ||
284 | sas_eh_finish_cmd(cmd); | 285 | sas_eh_finish_cmd(cmd); |
285 | } | 286 | } |
286 | } | 287 | } |