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, 2 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index ad3cacb9192d..9746cd1e664b 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -868,10 +868,6 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp)
868 DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);) 868 DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);)
869 869
870 fcport = sp->fcport; 870 fcport = sp->fcport;
871 if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
872 atomic_read(&fcport->state) == FCS_DEVICE_LOST) {
873 return 1;
874 }
875 871
876 spin_lock_irqsave(&ha->hardware_lock, flags); 872 spin_lock_irqsave(&ha->hardware_lock, flags);
877 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { 873 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {
@@ -1008,6 +1004,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa,
1008 mcp->tov = 30; 1004 mcp->tov = 30;
1009 mcp->flags = 0; 1005 mcp->flags = 0;
1010 rval = qla2x00_mailbox_command(ha, mcp); 1006 rval = qla2x00_mailbox_command(ha, mcp);
1007 if (mcp->mb[0] == MBS_COMMAND_ERROR)
1008 rval = QLA_COMMAND_ERROR;
1011 1009
1012 /* Return data. */ 1010 /* Return data. */
1013 *id = mcp->mb[1]; 1011 *id = mcp->mb[1];
@@ -2179,10 +2177,6 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp)
2179 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) 2177 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);)
2180 2178
2181 fcport = sp->fcport; 2179 fcport = sp->fcport;
2182 if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
2183 atomic_read(&fcport->state) == FCS_DEVICE_LOST) {
2184 return QLA_FUNCTION_FAILED;
2185 }
2186 2180
2187 spin_lock_irqsave(&ha->hardware_lock, flags); 2181 spin_lock_irqsave(&ha->hardware_lock, flags);
2188 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { 2182 for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) {