[PATCH] qla2xxx: fix bad locking during eh_abort

Andrew Vasquez
2005-05-26T23:19:39Z

James,

Please apply, this should go in before 2.6.12 is released.

Correct incorrect locking order in qla2xxx_eh_abort() handler which
would case a hang during certain code-paths.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
---

drivers/scsi/qla2xxx/qla_os.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)

drivers/scsi/qla2xxx/qla_os.c: needs update
Index: drivers/scsi/qla2xxx/qla_os.c
===================================================================
--- d9be308337b4cca0f0829b0bd62f1d5b830954e1/drivers/scsi/qla2xxx/qla_os.c (mode:100644)
+++ uncommitted/drivers/scsi/qla2xxx/qla_os.c (mode:100644)
@@ -547,16 +547,15 @@

break;
}
+ spin_unlock(&ha->hardware_lock);

/* Wait for the command to be returned. */
if (ret == SUCCESS) {
- spin_unlock(&ha->hardware_lock);
if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) {
qla_printk(KERN_ERR, ha,
"scsi(%ld:%d:%d): Abort handler timed out -- %lx "
"%x.\n", ha->host_no, id, lun, serial, ret);
}
- spin_lock(&ha->hardware_lock);
}
spin_lock_irq(ha->host->host_lock);