diff options
author | Quinn Tran <quinn.tran@qlogic.com> | 2017-12-28 21:33:23 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-04 05:41:06 +0100 |
commit | 94d83e3641765e08076efc93632eab579c0397e2 (patch) | |
tree | 6969ae522b5dcd1541c59bca1bea9750df5f00ef /drivers/scsi/qla2xxx/qla_dfs.c | |
parent | scsi: qla2xxx: Allow target mode to accept PRLI in dual mode (diff) | |
download | linux-94d83e3641765e08076efc93632eab579c0397e2.tar.xz linux-94d83e3641765e08076efc93632eab579c0397e2.zip |
scsi: qla2xxx: Tweak resource count dump
Fetch actual data from firmware instead of static data
at chip reset time.
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dfs.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dfs.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c index d231e7156134..ddb53db61fd2 100644 --- a/drivers/scsi/qla2xxx/qla_dfs.c +++ b/drivers/scsi/qla2xxx/qla_dfs.c @@ -127,21 +127,23 @@ static int qla_dfs_fw_resource_cnt_show(struct seq_file *s, void *unused) { struct scsi_qla_host *vha = s->private; - struct qla_hw_data *ha = vha->hw; - - seq_puts(s, "FW Resource count\n\n"); - seq_printf(s, "Original TGT exchg count[%d]\n", - ha->orig_fw_tgt_xcb_count); - seq_printf(s, "current TGT exchg count[%d]\n", - ha->cur_fw_tgt_xcb_count); - seq_printf(s, "original Initiator Exchange count[%d]\n", - ha->orig_fw_xcb_count); - seq_printf(s, "Current Initiator Exchange count[%d]\n", - ha->cur_fw_xcb_count); - seq_printf(s, "Original IOCB count[%d]\n", ha->orig_fw_iocb_count); - seq_printf(s, "Current IOCB count[%d]\n", ha->cur_fw_iocb_count); - seq_printf(s, "MAX VP count[%d]\n", ha->max_npiv_vports); - seq_printf(s, "MAX FCF count[%d]\n", ha->fw_max_fcf_count); + uint16_t mb[MAX_IOCB_MB_REG]; + int rc; + + rc = qla24xx_res_count_wait(vha, mb, SIZEOF_IOCB_MB_REG); + if (rc != QLA_SUCCESS) { + seq_printf(s, "Mailbox Command failed %d, mb %#x", rc, mb[0]); + } else { + seq_puts(s, "FW Resource count\n\n"); + seq_printf(s, "Original TGT exchg count[%d]\n", mb[1]); + seq_printf(s, "current TGT exchg count[%d]\n", mb[2]); + seq_printf(s, "original Initiator Exchange count[%d]\n", mb[3]); + seq_printf(s, "Current Initiator Exchange count[%d]\n", mb[6]); + seq_printf(s, "Original IOCB count[%d]\n", mb[7]); + seq_printf(s, "Current IOCB count[%d]\n", mb[10]); + seq_printf(s, "MAX VP count[%d]\n", mb[11]); + seq_printf(s, "MAX FCF count[%d]\n", mb[12]); + } return 0; } |