public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* libsas: correctly flush the LU queue on error recovery
@ 2008-02-22 23:07 James Bottomley
  0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2008-02-22 23:07 UTC (permalink / raw)
  To: linux-scsi

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>

---

diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index b796d99..57ba99f 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -282,7 +282,8 @@ static void sas_scsi_clear_queue_lu(struct list_head *error_q, struct scsi_cmnd
 	struct scsi_cmnd *cmd, *n;
 
 	list_for_each_entry_safe(cmd, n, error_q, eh_entry) {
-		if (cmd == my_cmd)
+		if (cmd->device->sdev_target == my_cmd->device->sdev_target &&
+		    cmd->device->lun == my_cmd->device->lun)
 			sas_eh_finish_cmd(cmd);
 	}
 }



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-22 23:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 23:07 libsas: correctly flush the LU queue on error recovery James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox