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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 250d2f604397..bc90d6b8d0a0 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -918,6 +918,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa,
918 rval = qla2x00_mailbox_command(ha, mcp); 918 rval = qla2x00_mailbox_command(ha, mcp);
919 if (mcp->mb[0] == MBS_COMMAND_ERROR) 919 if (mcp->mb[0] == MBS_COMMAND_ERROR)
920 rval = QLA_COMMAND_ERROR; 920 rval = QLA_COMMAND_ERROR;
921 else if (mcp->mb[0] == MBS_INVALID_COMMAND)
922 rval = QLA_INVALID_COMMAND;
921 923
922 /* Return data. */ 924 /* Return data. */
923 *id = mcp->mb[1]; 925 *id = mcp->mb[1];
@@ -2161,17 +2163,18 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp)
2161 struct abort_entry_24xx *abt; 2163 struct abort_entry_24xx *abt;
2162 dma_addr_t abt_dma; 2164 dma_addr_t abt_dma;
2163 uint32_t handle; 2165 uint32_t handle;
2166 scsi_qla_host_t *pha = to_qla_parent(ha);
2164 2167
2165 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); 2168 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2166 2169
2167 fcport = sp->fcport; 2170 fcport = sp->fcport;
2168 2171
2169 spin_lock_irqsave(&ha->hardware_lock, flags); 2172 spin_lock_irqsave(&pha->hardware_lock, flags);
2170 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { 2173 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {
2171 if (ha->outstanding_cmds[handle] == sp) 2174 if (pha->outstanding_cmds[handle] == sp)
2172 break; 2175 break;
2173 } 2176 }
2174 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2177 spin_unlock_irqrestore(&pha->hardware_lock, flags);
2175 if (handle == MAX_OUTSTANDING_COMMANDS) { 2178 if (handle == MAX_OUTSTANDING_COMMANDS) {
2176 /* Command not found. */ 2179 /* Command not found. */
2177 return QLA_FUNCTION_FAILED; 2180 return QLA_FUNCTION_FAILED;