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.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index e473e9fb363c..7a7c0ecfe7dd 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -71,6 +71,13 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
71 return QLA_FUNCTION_TIMEOUT; 71 return QLA_FUNCTION_TIMEOUT;
72 } 72 }
73 73
74 if (ha->flags.isp82xx_fw_hung) {
75 /* Setting Link-Down error */
76 mcp->mb[0] = MBS_LINK_DOWN_ERROR;
77 rval = QLA_FUNCTION_FAILED;
78 goto premature_exit;
79 }
80
74 /* 81 /*
75 * Wait for active mailbox commands to finish by waiting at most tov 82 * Wait for active mailbox commands to finish by waiting at most tov
76 * seconds. This is to serialize actual issuing of mailbox cmds during 83 * seconds. This is to serialize actual issuing of mailbox cmds during
@@ -83,13 +90,6 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
83 return QLA_FUNCTION_TIMEOUT; 90 return QLA_FUNCTION_TIMEOUT;
84 } 91 }
85 92
86 if (IS_QLA82XX(ha) && ha->flags.fw_hung) {
87 /* Setting Link-Down error */
88 mcp->mb[0] = MBS_LINK_DOWN_ERROR;
89 rval = QLA_FUNCTION_FAILED;
90 goto premature_exit;
91 }
92
93 ha->flags.mbox_busy = 1; 93 ha->flags.mbox_busy = 1;
94 /* Save mailbox command for debug */ 94 /* Save mailbox command for debug */
95 ha->mcp = mcp; 95 ha->mcp = mcp;
@@ -223,7 +223,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
223 ha->flags.mbox_int = 0; 223 ha->flags.mbox_int = 0;
224 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); 224 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
225 225
226 if (IS_QLA82XX(ha) && ha->flags.fw_hung) { 226 if (ha->flags.isp82xx_fw_hung) {
227 ha->flags.mbox_busy = 0; 227 ha->flags.mbox_busy = 0;
228 /* Setting Link-Down error */ 228 /* Setting Link-Down error */
229 mcp->mb[0] = MBS_LINK_DOWN_ERROR; 229 mcp->mb[0] = MBS_LINK_DOWN_ERROR;
@@ -2462,22 +2462,19 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport,
2462 "-- completion status (%x).\n", __func__, 2462 "-- completion status (%x).\n", __func__,
2463 vha->host_no, le16_to_cpu(sts->comp_status))); 2463 vha->host_no, le16_to_cpu(sts->comp_status)));
2464 rval = QLA_FUNCTION_FAILED; 2464 rval = QLA_FUNCTION_FAILED;
2465 } else if (!(le16_to_cpu(sts->scsi_status) & 2465 } else if (le16_to_cpu(sts->scsi_status) &
2466 SS_RESPONSE_INFO_LEN_VALID)) { 2466 SS_RESPONSE_INFO_LEN_VALID) {
2467 DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " 2467 if (le32_to_cpu(sts->rsp_data_len) < 4) {
2468 "-- no response info (%x).\n", __func__, vha->host_no, 2468 DEBUG2_3_11(printk("%s(%ld): ignoring inconsistent "
2469 le16_to_cpu(sts->scsi_status))); 2469 "data length -- not enough response info (%d).\n",
2470 rval = QLA_FUNCTION_FAILED; 2470 __func__, vha->host_no,
2471 } else if (le32_to_cpu(sts->rsp_data_len) < 4) { 2471 le32_to_cpu(sts->rsp_data_len)));
2472 DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " 2472 } else if (sts->data[3]) {
2473 "-- not enough response info (%d).\n", __func__, 2473 DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB "
2474 vha->host_no, le32_to_cpu(sts->rsp_data_len))); 2474 "-- response (%x).\n", __func__,
2475 rval = QLA_FUNCTION_FAILED; 2475 vha->host_no, sts->data[3]));
2476 } else if (sts->data[3]) { 2476 rval = QLA_FUNCTION_FAILED;
2477 DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " 2477 }
2478 "-- response (%x).\n", __func__,
2479 vha->host_no, sts->data[3]));
2480 rval = QLA_FUNCTION_FAILED;
2481 } 2478 }
2482 2479
2483 /* Issue marker IOCB. */ 2480 /* Issue marker IOCB. */