summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2019-01-28 14:14:24 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-05 22:28:11 -0500
commit63df6d637e3358e64b43e7a774939f8f963926cb (patch)
treee6e1dd77af843a03018cd21bf3236cd94f2ad92d /drivers/scsi/lpfc
parent18c27a621614716485b2e881d7e29599f063bb03 (diff)
scsi: lpfc: Adapt cpucheck debugfs logic to Hardware Queues
Similar to the io execution path that reports cpu context information, the debugfs routines for cpu information needs to be aligned with new hardware queue implementation. Convert debugfs cnd nvme cpucheck statistics to report information per Hardware Queue. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc.h5
-rw-r--r--drivers/scsi/lpfc/lpfc_debugfs.c129
-rw-r--r--drivers/scsi/lpfc/lpfc_nvme.c37
-rw-r--r--drivers/scsi/lpfc/lpfc_nvmet.c58
-rw-r--r--drivers/scsi/lpfc/lpfc_sli4.h11
5 files changed, 124 insertions, 116 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index feae8fb57623..310437b6b51a 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1152,11 +1152,6 @@ struct lpfc_hba {
1152 uint16_t sfp_warning; 1152 uint16_t sfp_warning;
1153 1153
1154#ifdef CONFIG_SCSI_LPFC_DEBUG_FS 1154#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
1155#define LPFC_CHECK_CPU_CNT 32
1156 uint32_t cpucheck_rcv_io[LPFC_CHECK_CPU_CNT];
1157 uint32_t cpucheck_xmt_io[LPFC_CHECK_CPU_CNT];
1158 uint32_t cpucheck_cmpl_io[LPFC_CHECK_CPU_CNT];
1159 uint32_t cpucheck_ccmpl_io[LPFC_CHECK_CPU_CNT];
1160 uint16_t cpucheck_on; 1155 uint16_t cpucheck_on;
1161#define LPFC_CHECK_OFF 0 1156#define LPFC_CHECK_OFF 0
1162#define LPFC_CHECK_NVME_IO 1 1157#define LPFC_CHECK_NVME_IO 1
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index a1b7263bfe2a..d84fb8c088b1 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -1366,62 +1366,67 @@ static int
1366lpfc_debugfs_cpucheck_data(struct lpfc_vport *vport, char *buf, int size) 1366lpfc_debugfs_cpucheck_data(struct lpfc_vport *vport, char *buf, int size)
1367{ 1367{
1368 struct lpfc_hba *phba = vport->phba; 1368 struct lpfc_hba *phba = vport->phba;
1369 int i; 1369 struct lpfc_sli4_hdw_queue *qp;
1370 int i, j;
1370 int len = 0; 1371 int len = 0;
1371 uint32_t tot_xmt = 0; 1372 uint32_t tot_xmt;
1372 uint32_t tot_rcv = 0; 1373 uint32_t tot_rcv;
1373 uint32_t tot_cmpl = 0; 1374 uint32_t tot_cmpl;
1374 uint32_t tot_ccmpl = 0;
1375 1375
1376 if (phba->nvmet_support == 0) { 1376 len += snprintf(buf + len, PAGE_SIZE - len,
1377 /* NVME Initiator */ 1377 "CPUcheck %s ",
1378 len += snprintf(buf + len, PAGE_SIZE - len, 1378 (phba->cpucheck_on & LPFC_CHECK_NVME_IO ?
1379 "CPUcheck %s\n", 1379 "Enabled" : "Disabled"));
1380 (phba->cpucheck_on & LPFC_CHECK_NVME_IO ? 1380 if (phba->nvmet_support) {
1381 "Enabled" : "Disabled"));
1382 for (i = 0; i < phba->sli4_hba.num_present_cpu; i++) {
1383 if (i >= LPFC_CHECK_CPU_CNT)
1384 break;
1385 len += snprintf(buf + len, PAGE_SIZE - len,
1386 "%02d: xmit x%08x cmpl x%08x\n",
1387 i, phba->cpucheck_xmt_io[i],
1388 phba->cpucheck_cmpl_io[i]);
1389 tot_xmt += phba->cpucheck_xmt_io[i];
1390 tot_cmpl += phba->cpucheck_cmpl_io[i];
1391 }
1392 len += snprintf(buf + len, PAGE_SIZE - len, 1381 len += snprintf(buf + len, PAGE_SIZE - len,
1393 "tot:xmit x%08x cmpl x%08x\n", 1382 "%s\n",
1394 tot_xmt, tot_cmpl); 1383 (phba->cpucheck_on & LPFC_CHECK_NVMET_RCV ?
1395 return len; 1384 "Rcv Enabled\n" : "Rcv Disabled\n"));
1385 } else {
1386 len += snprintf(buf + len, PAGE_SIZE - len, "\n");
1396 } 1387 }
1397 1388
1398 /* NVME Target */ 1389 for (i = 0; i < phba->cfg_hdw_queue; i++) {
1399 len += snprintf(buf + len, PAGE_SIZE - len, 1390 qp = &phba->sli4_hba.hdwq[i];
1400 "CPUcheck %s ", 1391
1401 (phba->cpucheck_on & LPFC_CHECK_NVMET_IO ? 1392 tot_rcv = 0;
1402 "IO Enabled - " : "IO Disabled - ")); 1393 tot_xmt = 0;
1403 len += snprintf(buf + len, PAGE_SIZE - len, 1394 tot_cmpl = 0;
1404 "%s\n", 1395 for (j = 0; j < LPFC_CHECK_CPU_CNT; j++) {
1405 (phba->cpucheck_on & LPFC_CHECK_NVMET_RCV ? 1396 tot_xmt += qp->cpucheck_xmt_io[j];
1406 "Rcv Enabled\n" : "Rcv Disabled\n")); 1397 tot_cmpl += qp->cpucheck_cmpl_io[j];
1407 for (i = 0; i < phba->sli4_hba.num_present_cpu; i++) { 1398 if (phba->nvmet_support)
1408 if (i >= LPFC_CHECK_CPU_CNT) 1399 tot_rcv += qp->cpucheck_rcv_io[j];
1409 break; 1400 }
1401
1402 /* Only display Hardware Qs with something */
1403 if (!tot_xmt && !tot_cmpl && !tot_rcv)
1404 continue;
1405
1406 len += snprintf(buf + len, PAGE_SIZE - len,
1407 "HDWQ %03d: ", i);
1408 for (j = 0; j < LPFC_CHECK_CPU_CNT; j++) {
1409 /* Only display non-zero counters */
1410 if (!qp->cpucheck_xmt_io[j] &&
1411 !qp->cpucheck_cmpl_io[j] &&
1412 !qp->cpucheck_rcv_io[j])
1413 continue;
1414 if (phba->nvmet_support) {
1415 len += snprintf(buf + len, PAGE_SIZE - len,
1416 "CPU %03d: %x/%x/%x ", j,
1417 qp->cpucheck_rcv_io[j],
1418 qp->cpucheck_xmt_io[j],
1419 qp->cpucheck_cmpl_io[j]);
1420 } else {
1421 len += snprintf(buf + len, PAGE_SIZE - len,
1422 "CPU %03d: %x/%x ", j,
1423 qp->cpucheck_xmt_io[j],
1424 qp->cpucheck_cmpl_io[j]);
1425 }
1426 }
1410 len += snprintf(buf + len, PAGE_SIZE - len, 1427 len += snprintf(buf + len, PAGE_SIZE - len,
1411 "%02d: xmit x%08x ccmpl x%08x " 1428 "Total: %x\n", tot_xmt);
1412 "cmpl x%08x rcv x%08x\n",
1413 i, phba->cpucheck_xmt_io[i],
1414 phba->cpucheck_ccmpl_io[i],
1415 phba->cpucheck_cmpl_io[i],
1416 phba->cpucheck_rcv_io[i]);
1417 tot_xmt += phba->cpucheck_xmt_io[i];
1418 tot_rcv += phba->cpucheck_rcv_io[i];
1419 tot_cmpl += phba->cpucheck_cmpl_io[i];
1420 tot_ccmpl += phba->cpucheck_ccmpl_io[i];
1421 } 1429 }
1422 len += snprintf(buf + len, PAGE_SIZE - len,
1423 "tot:xmit x%08x ccmpl x%08x cmpl x%08x rcv x%08x\n",
1424 tot_xmt, tot_ccmpl, tot_cmpl, tot_rcv);
1425 return len; 1430 return len;
1426} 1431}
1427 1432
@@ -2474,9 +2479,10 @@ lpfc_debugfs_cpucheck_write(struct file *file, const char __user *buf,
2474 struct lpfc_debug *debug = file->private_data; 2479 struct lpfc_debug *debug = file->private_data;
2475 struct lpfc_vport *vport = (struct lpfc_vport *)debug->i_private; 2480 struct lpfc_vport *vport = (struct lpfc_vport *)debug->i_private;
2476 struct lpfc_hba *phba = vport->phba; 2481 struct lpfc_hba *phba = vport->phba;
2482 struct lpfc_sli4_hdw_queue *qp;
2477 char mybuf[64]; 2483 char mybuf[64];
2478 char *pbuf; 2484 char *pbuf;
2479 int i; 2485 int i, j;
2480 2486
2481 if (nbytes > 64) 2487 if (nbytes > 64)
2482 nbytes = 64; 2488 nbytes = 64;
@@ -2506,13 +2512,14 @@ lpfc_debugfs_cpucheck_write(struct file *file, const char __user *buf,
2506 return strlen(pbuf); 2512 return strlen(pbuf);
2507 } else if ((strncmp(pbuf, "zero", 2513 } else if ((strncmp(pbuf, "zero",
2508 sizeof("zero") - 1) == 0)) { 2514 sizeof("zero") - 1) == 0)) {
2509 for (i = 0; i < phba->sli4_hba.num_present_cpu; i++) { 2515 for (i = 0; i < phba->cfg_hdw_queue; i++) {
2510 if (i >= LPFC_CHECK_CPU_CNT) 2516 qp = &phba->sli4_hba.hdwq[i];
2511 break; 2517
2512 phba->cpucheck_rcv_io[i] = 0; 2518 for (j = 0; j < LPFC_CHECK_CPU_CNT; j++) {
2513 phba->cpucheck_xmt_io[i] = 0; 2519 qp->cpucheck_rcv_io[j] = 0;
2514 phba->cpucheck_cmpl_io[i] = 0; 2520 qp->cpucheck_xmt_io[j] = 0;
2515 phba->cpucheck_ccmpl_io[i] = 0; 2521 qp->cpucheck_cmpl_io[j] = 0;
2522 }
2516 } 2523 }
2517 return strlen(pbuf); 2524 return strlen(pbuf);
2518 } 2525 }
@@ -5358,9 +5365,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5358 /* Setup hbqinfo */ 5365 /* Setup hbqinfo */
5359 snprintf(name, sizeof(name), "hbqinfo"); 5366 snprintf(name, sizeof(name), "hbqinfo");
5360 phba->debug_hbqinfo = 5367 phba->debug_hbqinfo =
5361 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5368 debugfs_create_file(name, S_IFREG | 0644,
5362 phba->hba_debugfs_root, 5369 phba->hba_debugfs_root,
5363 phba, &lpfc_debugfs_op_hbqinfo); 5370 phba, &lpfc_debugfs_op_hbqinfo);
5364 5371
5365 /* Setup hdwqinfo */ 5372 /* Setup hdwqinfo */
5366 snprintf(name, sizeof(name), "hdwqinfo"); 5373 snprintf(name, sizeof(name), "hdwqinfo");
@@ -5370,7 +5377,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5370 phba, &lpfc_debugfs_op_hdwqinfo); 5377 phba, &lpfc_debugfs_op_hdwqinfo);
5371 if (!phba->debug_hdwqinfo) { 5378 if (!phba->debug_hdwqinfo) {
5372 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, 5379 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5373 "0411 Cant create debugfs hdwqinfo\n"); 5380 "0511 Cant create debugfs hdwqinfo\n");
5374 goto debug_failed; 5381 goto debug_failed;
5375 } 5382 }
5376 5383
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 0ecc73a6634f..fe0190b48abd 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -965,7 +965,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
965 struct lpfc_nvme_fcpreq_priv *freqpriv; 965 struct lpfc_nvme_fcpreq_priv *freqpriv;
966 struct lpfc_nvme_lport *lport; 966 struct lpfc_nvme_lport *lport;
967 struct lpfc_nvme_ctrl_stat *cstat; 967 struct lpfc_nvme_ctrl_stat *cstat;
968 uint32_t code, status, idx; 968 uint32_t code, status, idx, cpu;
969 uint16_t cid, sqhd, data; 969 uint16_t cid, sqhd, data;
970 uint32_t *ptr; 970 uint32_t *ptr;
971 971
@@ -1136,13 +1136,17 @@ out_err:
1136 lpfc_nvme_ktime(phba, lpfc_ncmd); 1136 lpfc_nvme_ktime(phba, lpfc_ncmd);
1137 } 1137 }
1138 if (phba->cpucheck_on & LPFC_CHECK_NVME_IO) { 1138 if (phba->cpucheck_on & LPFC_CHECK_NVME_IO) {
1139 if (lpfc_ncmd->cpu != smp_processor_id()) 1139 idx = lpfc_ncmd->cur_iocbq.hba_wqidx;
1140 lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_IOERR, 1140 cpu = smp_processor_id();
1141 "6701 CPU Check cmpl: " 1141 if (cpu < LPFC_CHECK_CPU_CNT) {
1142 "cpu %d expect %d\n", 1142 if (lpfc_ncmd->cpu != cpu)
1143 smp_processor_id(), lpfc_ncmd->cpu); 1143 lpfc_printf_vlog(vport,
1144 if (lpfc_ncmd->cpu < LPFC_CHECK_CPU_CNT) 1144 KERN_INFO, LOG_NVME_IOERR,
1145 phba->cpucheck_cmpl_io[lpfc_ncmd->cpu]++; 1145 "6701 CPU Check cmpl: "
1146 "cpu %d expect %d\n",
1147 cpu, lpfc_ncmd->cpu);
1148 phba->sli4_hba.hdwq[idx].cpucheck_cmpl_io[cpu]++;
1149 }
1146 } 1150 }
1147#endif 1151#endif
1148 1152
@@ -1421,7 +1425,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport,
1421{ 1425{
1422 int ret = 0; 1426 int ret = 0;
1423 int expedite = 0; 1427 int expedite = 0;
1424 int idx; 1428 int idx, cpu;
1425 struct lpfc_nvme_lport *lport; 1429 struct lpfc_nvme_lport *lport;
1426 struct lpfc_nvme_ctrl_stat *cstat; 1430 struct lpfc_nvme_ctrl_stat *cstat;
1427 struct lpfc_vport *vport; 1431 struct lpfc_vport *vport;
@@ -1620,21 +1624,18 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port *pnvme_lport,
1620 lpfc_ncmd->ts_cmd_wqput = ktime_get_ns(); 1624 lpfc_ncmd->ts_cmd_wqput = ktime_get_ns();
1621 1625
1622 if (phba->cpucheck_on & LPFC_CHECK_NVME_IO) { 1626 if (phba->cpucheck_on & LPFC_CHECK_NVME_IO) {
1623 lpfc_ncmd->cpu = smp_processor_id(); 1627 cpu = smp_processor_id();
1624 if (lpfc_ncmd->cpu != lpfc_queue_info->index) { 1628 if (cpu < LPFC_CHECK_CPU_CNT) {
1625 /* Check for admin queue */ 1629 lpfc_ncmd->cpu = cpu;
1626 if (lpfc_queue_info->qidx) { 1630 if (idx != cpu)
1627 lpfc_printf_vlog(vport, 1631 lpfc_printf_vlog(vport,
1628 KERN_ERR, LOG_NVME_IOERR, 1632 KERN_INFO, LOG_NVME_IOERR,
1629 "6702 CPU Check cmd: " 1633 "6702 CPU Check cmd: "
1630 "cpu %d wq %d\n", 1634 "cpu %d wq %d\n",
1631 lpfc_ncmd->cpu, 1635 lpfc_ncmd->cpu,
1632 lpfc_queue_info->index); 1636 lpfc_queue_info->index);
1633 } 1637 phba->sli4_hba.hdwq[idx].cpucheck_xmt_io[cpu]++;
1634 lpfc_ncmd->cpu = lpfc_queue_info->index;
1635 } 1638 }
1636 if (lpfc_ncmd->cpu < LPFC_CHECK_CPU_CNT)
1637 phba->cpucheck_xmt_io[lpfc_ncmd->cpu]++;
1638 } 1639 }
1639#endif 1640#endif
1640 return 0; 1641 return 0;
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index f2a30ee9702b..b5e287cacc2a 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -744,16 +744,6 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
744 ktime_get_ns(); 744 ktime_get_ns();
745 } 745 }
746 } 746 }
747 if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) {
748 id = smp_processor_id();
749 if (ctxp->cpu != id)
750 lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR,
751 "6703 CPU Check cmpl: "
752 "cpu %d expect %d\n",
753 id, ctxp->cpu);
754 if (ctxp->cpu < LPFC_CHECK_CPU_CNT)
755 phba->cpucheck_cmpl_io[id]++;
756 }
757#endif 747#endif
758 rsp->done(rsp); 748 rsp->done(rsp);
759#ifdef CONFIG_SCSI_LPFC_DEBUG_FS 749#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
@@ -771,19 +761,22 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
771 ctxp->ts_isr_data = cmdwqe->isr_timestamp; 761 ctxp->ts_isr_data = cmdwqe->isr_timestamp;
772 ctxp->ts_data_nvme = ktime_get_ns(); 762 ctxp->ts_data_nvme = ktime_get_ns();
773 } 763 }
774 if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) { 764#endif
775 id = smp_processor_id(); 765 rsp->done(rsp);
766 }
767#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
768 if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) {
769 id = smp_processor_id();
770 if (id < LPFC_CHECK_CPU_CNT) {
776 if (ctxp->cpu != id) 771 if (ctxp->cpu != id)
777 lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, 772 lpfc_printf_log(phba, KERN_INFO, LOG_NVME_IOERR,
778 "6704 CPU Check cmdcmpl: " 773 "6704 CPU Check cmdcmpl: "
779 "cpu %d expect %d\n", 774 "cpu %d expect %d\n",
780 id, ctxp->cpu); 775 id, ctxp->cpu);
781 if (ctxp->cpu < LPFC_CHECK_CPU_CNT) 776 phba->sli4_hba.hdwq[rsp->hwqid].cpucheck_cmpl_io[id]++;
782 phba->cpucheck_ccmpl_io[id]++;
783 } 777 }
784#endif
785 rsp->done(rsp);
786 } 778 }
779#endif
787} 780}
788 781
789static int 782static int
@@ -910,16 +903,15 @@ lpfc_nvmet_xmt_fcp_op(struct nvmet_fc_target_port *tgtport,
910 } 903 }
911 if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) { 904 if (phba->cpucheck_on & LPFC_CHECK_NVMET_IO) {
912 int id = smp_processor_id(); 905 int id = smp_processor_id();
913 ctxp->cpu = id; 906 if (id < LPFC_CHECK_CPU_CNT) {
914 if (id < LPFC_CHECK_CPU_CNT) 907 if (rsp->hwqid != id)
915 phba->cpucheck_xmt_io[id]++; 908 lpfc_printf_log(phba, KERN_INFO, LOG_NVME_IOERR,
916 if (rsp->hwqid != id) { 909 "6705 CPU Check OP: "
917 lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, 910 "cpu %d expect %d\n",
918 "6705 CPU Check OP: " 911 id, rsp->hwqid);
919 "cpu %d expect %d\n", 912 phba->sli4_hba.hdwq[rsp->hwqid].cpucheck_xmt_io[id]++;
920 id, rsp->hwqid);
921 ctxp->cpu = rsp->hwqid;
922 } 913 }
914 ctxp->cpu = id; /* Setup cpu for cmpl check */
923 } 915 }
924#endif 916#endif
925 917
@@ -1897,9 +1889,6 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
1897 uint32_t size, oxid, sid, rc, qno; 1889 uint32_t size, oxid, sid, rc, qno;
1898 unsigned long iflag; 1890 unsigned long iflag;
1899 int current_cpu; 1891 int current_cpu;
1900#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
1901 uint32_t id;
1902#endif
1903 1892
1904 if (!IS_ENABLED(CONFIG_NVME_TARGET_FC)) 1893 if (!IS_ENABLED(CONFIG_NVME_TARGET_FC))
1905 return; 1894 return;
@@ -1940,9 +1929,14 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
1940 1929
1941#ifdef CONFIG_SCSI_LPFC_DEBUG_FS 1930#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
1942 if (phba->cpucheck_on & LPFC_CHECK_NVMET_RCV) { 1931 if (phba->cpucheck_on & LPFC_CHECK_NVMET_RCV) {
1943 id = smp_processor_id(); 1932 if (current_cpu < LPFC_CHECK_CPU_CNT) {
1944 if (id < LPFC_CHECK_CPU_CNT) 1933 if (idx != current_cpu)
1945 phba->cpucheck_rcv_io[id]++; 1934 lpfc_printf_log(phba, KERN_INFO, LOG_NVME_IOERR,
1935 "6703 CPU Check rcv: "
1936 "cpu %d expect %d\n",
1937 current_cpu, idx);
1938 phba->sli4_hba.hdwq[idx].cpucheck_rcv_io[current_cpu]++;
1939 }
1946 } 1940 }
1947#endif 1941#endif
1948 1942
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 4862249732dd..8e3e99d52f75 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -20,6 +20,10 @@
20 * included with this package. * 20 * included with this package. *
21 *******************************************************************/ 21 *******************************************************************/
22 22
23#if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_SCSI_LPFC_DEBUG_FS)
24#define CONFIG_SCSI_LPFC_DEBUG_FS
25#endif
26
23#define LPFC_ACTIVE_MBOX_WAIT_CNT 100 27#define LPFC_ACTIVE_MBOX_WAIT_CNT 100
24#define LPFC_XRI_EXCH_BUSY_WAIT_TMO 10000 28#define LPFC_XRI_EXCH_BUSY_WAIT_TMO 10000
25#define LPFC_XRI_EXCH_BUSY_WAIT_T1 10 29#define LPFC_XRI_EXCH_BUSY_WAIT_T1 10
@@ -555,6 +559,13 @@ struct lpfc_sli4_hdw_queue {
555 uint32_t empty_io_bufs; 559 uint32_t empty_io_bufs;
556 uint32_t abts_scsi_io_bufs; 560 uint32_t abts_scsi_io_bufs;
557 uint32_t abts_nvme_io_bufs; 561 uint32_t abts_nvme_io_bufs;
562
563#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
564#define LPFC_CHECK_CPU_CNT 128
565 uint32_t cpucheck_rcv_io[LPFC_CHECK_CPU_CNT];
566 uint32_t cpucheck_xmt_io[LPFC_CHECK_CPU_CNT];
567 uint32_t cpucheck_cmpl_io[LPFC_CHECK_CPU_CNT];
568#endif
558}; 569};
559 570
560struct lpfc_sli4_hba { 571struct lpfc_sli4_hba {