aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 250d2f604397..dc5788bbc549 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -749,17 +749,18 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp)
749 uint32_t handle; 749 uint32_t handle;
750 mbx_cmd_t mc; 750 mbx_cmd_t mc;
751 mbx_cmd_t *mcp = &mc; 751 mbx_cmd_t *mcp = &mc;
752 scsi_qla_host_t *pha = to_qla_parent(ha);
752 753
753 DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no)); 754 DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no));
754 755
755 fcport = sp->fcport; 756 fcport = sp->fcport;
756 757
757 spin_lock_irqsave(&ha->hardware_lock, flags); 758 spin_lock_irqsave(&pha->hardware_lock, flags);
758 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { 759 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {
759 if (ha->outstanding_cmds[handle] == sp) 760 if (ha->outstanding_cmds[handle] == sp)
760 break; 761 break;
761 } 762 }
762 spin_unlock_irqrestore(&ha->hardware_lock, flags); 763 spin_unlock_irqrestore(&pha->hardware_lock, flags);
763 764
764 if (handle == MAX_OUTSTANDING_COMMANDS) { 765 if (handle == MAX_OUTSTANDING_COMMANDS) {
765 /* command not found */ 766 /* command not found */
@@ -2161,17 +2162,18 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp)
2161 struct abort_entry_24xx *abt; 2162 struct abort_entry_24xx *abt;
2162 dma_addr_t abt_dma; 2163 dma_addr_t abt_dma;
2163 uint32_t handle; 2164 uint32_t handle;
2165 scsi_qla_host_t *pha = to_qla_parent(ha);
2164 2166
2165 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); 2167 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2166 2168
2167 fcport = sp->fcport; 2169 fcport = sp->fcport;
2168 2170
2169 spin_lock_irqsave(&ha->hardware_lock, flags); 2171 spin_lock_irqsave(&pha->hardware_lock, flags);
2170 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { 2172 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {
2171 if (ha->outstanding_cmds[handle] == sp) 2173 if (ha->outstanding_cmds[handle] == sp)
2172 break; 2174 break;
2173 } 2175 }
2174 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2176 spin_unlock_irqrestore(&pha->hardware_lock, flags);
2175 if (handle == MAX_OUTSTANDING_COMMANDS) { 2177 if (handle == MAX_OUTSTANDING_COMMANDS) {
2176 /* Command not found. */ 2178 /* Command not found. */
2177 return QLA_FUNCTION_FAILED; 2179 return QLA_FUNCTION_FAILED;