Commit 079a3a3b authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Add appropriate debug info for invalid RX_ID

When driver detect CTIO_INVALID_RX_ID status for CTIO, print message with
correct information to help with debugging.
Signed-off-by: default avatarQuinn Tran <quinn.tran@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1073daa4
...@@ -3291,6 +3291,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, ...@@ -3291,6 +3291,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type,
cmd->state = QLA_TGT_STATE_PROCESSED; /* Mid-level is done processing */ cmd->state = QLA_TGT_STATE_PROCESSED; /* Mid-level is done processing */
cmd->cmd_sent_to_fw = 1; cmd->cmd_sent_to_fw = 1;
cmd->ctio_flags = le16_to_cpu(pkt->u.status0.flags);
/* Memory Barrier */ /* Memory Barrier */
wmb(); wmb();
...@@ -3369,6 +3370,7 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd) ...@@ -3369,6 +3370,7 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd)
cmd->state = QLA_TGT_STATE_NEED_DATA; cmd->state = QLA_TGT_STATE_NEED_DATA;
cmd->cmd_sent_to_fw = 1; cmd->cmd_sent_to_fw = 1;
cmd->ctio_flags = le16_to_cpu(pkt->u.status0.flags);
/* Memory Barrier */ /* Memory Barrier */
wmb(); wmb();
...@@ -3942,12 +3944,20 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, ...@@ -3942,12 +3944,20 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha,
if (unlikely(status != CTIO_SUCCESS)) { if (unlikely(status != CTIO_SUCCESS)) {
switch (status & 0xFFFF) { switch (status & 0xFFFF) {
case CTIO_INVALID_RX_ID:
if (printk_ratelimit())
dev_info(&vha->hw->pdev->dev,
"qla_target(%d): CTIO with INVALID_RX_ID ATIO attr %x CTIO Flags %x|%x\n",
vha->vp_idx, cmd->atio.u.isp24.attr,
((cmd->ctio_flags >> 9) & 0xf),
cmd->ctio_flags);
break;
case CTIO_LIP_RESET: case CTIO_LIP_RESET:
case CTIO_TARGET_RESET: case CTIO_TARGET_RESET:
case CTIO_ABORTED: case CTIO_ABORTED:
/* driver request abort via Terminate exchange */ /* driver request abort via Terminate exchange */
case CTIO_TIMEOUT: case CTIO_TIMEOUT:
case CTIO_INVALID_RX_ID:
/* They are OK */ /* They are OK */
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf058, ql_dbg(ql_dbg_tgt_mgt, vha, 0xf058,
"qla_target(%d): CTIO with " "qla_target(%d): CTIO with "
......
...@@ -908,6 +908,7 @@ struct qla_tgt_cmd { ...@@ -908,6 +908,7 @@ struct qla_tgt_cmd {
u64 unpacked_lun; u64 unpacked_lun;
enum dma_data_direction dma_data_direction; enum dma_data_direction dma_data_direction;
uint16_t ctio_flags;
uint16_t vp_idx; uint16_t vp_idx;
uint16_t loop_id; /* to save extra sess dereferences */ uint16_t loop_id; /* to save extra sess dereferences */
struct qla_tgt *tgt; /* to save extra sess dereferences */ struct qla_tgt *tgt; /* to save extra sess dereferences */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment