linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qla2xxx: Drop srb reference before waiting for completion
@ 2010-10-01 12:18 Hannes Reinecke
  2010-10-01 17:02 ` Giridhar Malavali
  2010-10-01 21:01 ` Mike Christie
  0 siblings, 2 replies; 8+ messages in thread
From: Hannes Reinecke @ 2010-10-01 12:18 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi


This patch fixes a regression introduced by commit
083a469db4ecf3b286a96b5b722c37fc1affe0be

qla2xxx_eh_wait_on_command() is waiting for an srb to
complete, which will never happen as the routine took
a reference to the srb previously and will only drop it
after this function. So every command abort will fail.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 1e4bff6..0af7549 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -883,6 +883,9 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 	}
 	spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
+	if (got_ref)
+		qla2x00_sp_compl(ha, sp);
+
 	/* Wait for the command to be returned. */
 	if (wait) {
 		if (qla2x00_eh_wait_on_command(cmd) != QLA_SUCCESS) {
@@ -893,9 +896,6 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 		}
 	}
 
-	if (got_ref)
-		qla2x00_sp_compl(ha, sp);
-
 	qla_printk(KERN_INFO, ha,
 	    "scsi(%ld:%d:%d): Abort command issued -- %d %lx %x.\n",
 	    vha->host_no, id, lun, wait, serial, ret);

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-08 21:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01 12:18 [PATCH] qla2xxx: Drop srb reference before waiting for completion Hannes Reinecke
2010-10-01 17:02 ` Giridhar Malavali
2010-10-01 21:01 ` Mike Christie
2010-10-01 21:10   ` Mike Christie
2010-10-05 15:42     ` Giridhar Malavali
2010-10-05 18:18       ` Mike Christie
2010-10-08 19:01         ` Giridhar Malavali
2010-10-08 21:44           ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).