Lines Matching +full:nc +full:- +full:si

4  * Copyright (c) 2003-2014 Chelsio Communications, Inc. All rights reserved.
16 * - Redistributions of source code must retain the above
20 * - Redistributions in binary form must reproduce the above
57 pos -= tb->skip_first; in seq_tab_get_idx()
58 return pos >= tb->rows ? NULL : &tb->data[pos * tb->width]; in seq_tab_get_idx()
63 struct seq_tab *tb = seq->private; in seq_tab_start()
65 if (tb->skip_first && *pos == 0) in seq_tab_start()
73 v = seq_tab_get_idx(seq->private, *pos + 1); in seq_tab_next()
84 const struct seq_tab *tb = seq->private; in seq_tab_show()
86 return tb->show(seq, v, ((char *)v - tb->data) / tb->width); in seq_tab_show()
104 p->show = show; in seq_open_tab()
105 p->rows = rows; in seq_open_tab()
106 p->width = width; in seq_open_tab()
107 p->skip_first = have_header != 0; in seq_open_tab()
117 if (new_rows > p->rows) in seq_tab_trim()
118 return -EINVAL; in seq_tab_trim()
119 p->rows = new_rows; in seq_tab_trim()
202 struct adapter *adap = inode->i_private; in cim_la_open()
208 if (is_t6(adap->params.chip)) { in cim_la_open()
210 p = seq_open_tab(file, (adap->params.cim_la_size / 10) + 1, in cim_la_open()
215 p = seq_open_tab(file, adap->params.cim_la_size / 8, in cim_la_open()
221 return -ENOMEM; in cim_la_open()
223 ret = t4_cim_read_la(adap, (u32 *)p->data, NULL); in cim_la_open()
260 struct adapter *adap = inode->i_private; in cim_pif_la_open()
265 return -ENOMEM; in cim_pif_la_open()
267 t4_cim_read_pif_la(adap, (u32 *)p->data, in cim_pif_la_open()
268 (u32 *)p->data + 6 * CIM_PIFLA_SIZE, NULL, NULL); in cim_pif_la_open()
306 struct adapter *adap = inode->i_private; in cim_ma_la_open()
311 return -ENOMEM; in cim_ma_la_open()
313 t4_cim_read_ma_la(adap, (u32 *)p->data, in cim_ma_la_open()
314 (u32 *)p->data + 5 * CIM_MALA_SIZE); in cim_ma_la_open()
329 "TP0", "TP1", "ULP", "SGE0", "SGE1", "NC-SI", in cim_qcfg_show()
330 "ULP0", "ULP1", "ULP2", "ULP3", "SGE", "NC-SI", in cim_qcfg_show()
331 "SGE0-RX", "SGE1-RX" in cim_qcfg_show()
335 struct adapter *adap = seq->private; in cim_qcfg_show()
343 int cim_num_obq = is_t4(adap->params.chip) ? in cim_qcfg_show()
346 i = t4_cim_read(adap, is_t4(adap->params.chip) ? UP_IBQ_0_RDADDR_A : in cim_qcfg_show()
350 if (is_t4(adap->params.chip)) { in cim_qcfg_show()
376 QUERDADDR_G(p[0]) & 0x3fff, wr[0] - base[i], in cim_qcfg_show()
396 unsigned int qid = (uintptr_t)inode->i_private & 7; in cim_ibq_open()
397 struct adapter *adap = inode->i_private - qid; in cim_ibq_open()
401 return -ENOMEM; in cim_ibq_open()
403 ret = t4_read_cim_ibq(adap, qid, (u32 *)p->data, CIM_IBQ_SIZE * 4); in cim_ibq_open()
423 unsigned int qid = (uintptr_t)inode->i_private & 7; in cim_obq_open()
424 struct adapter *adap = inode->i_private - qid; in cim_obq_open()
428 return -ENOMEM; in cim_obq_open()
430 ret = t4_read_cim_obq(adap, qid, (u32 *)p->data, 6 * CIM_OBQ_SIZE * 4); in cim_obq_open()
460 while (p->name) { in field_desc_show()
461 u64 mask = (1ULL << p->width) - 1; in field_desc_show()
462 int len = scnprintf(buf, sizeof(buf), "%s: %llu", p->name, in field_desc_show()
463 ((unsigned long long)v >> p->start) & mask); in field_desc_show()
528 if (idx < (TPLA_SIZE / 2 - 1) || p[1] != ~0ULL) in tp_la_show2()
634 if (idx < (TPLA_SIZE / 2 - 1) || p[1] != ~0ULL) in tp_la_show3()
642 struct adapter *adap = inode->i_private; in tp_la_open()
657 return -ENOMEM; in tp_la_open()
659 t4_tp_read_la(adap, (u64 *)p->data, NULL); in tp_la_open()
669 size_t size = min(sizeof(s) - 1, count); in tp_la_write()
670 struct adapter *adap = file_inode(file)->i_private; in tp_la_write()
673 return -EFAULT; in tp_la_write()
679 return -EINVAL; in tp_la_write()
680 adap->params.tp.la_mask = val << 16; in tp_la_write()
682 adap->params.tp.la_mask); in tp_la_write()
711 struct adapter *adap = inode->i_private; in ulprx_la_open()
716 return -ENOMEM; in ulprx_la_open()
718 t4_ulprx_read_la(adap, (u32 *)p->data); in ulprx_la_open()
734 * Write Bypass: cut-through
735 * Bypass + mem: cut-through and save copy
739 * Write Bypass: cut-through
754 struct adapter *adap = seq->private; in pm_stats_show()
760 for (i = 0; i < PM_NSTATS - 1; i++) in pm_stats_show()
761 seq_printf(seq, "%-13s %10u %20llu\n", in pm_stats_show()
765 for (i = 0; i < PM_NSTATS - 1; i++) in pm_stats_show()
766 seq_printf(seq, "%-13s %10u %20llu\n", in pm_stats_show()
769 if (CHELSIO_CHIP_VERSION(adap->params.chip) > CHELSIO_T5) { in pm_stats_show()
799 return single_open(file, pm_stats_show, inode->i_private); in pm_stats_open()
805 struct adapter *adap = file_inode(file)->i_private; in pm_stats_clear()
824 struct adapter *adap = seq->private; in tx_rate_show()
827 if (adap->params.arch.nchan == NCHAN) { in tx_rate_show()
861 struct adapter *adap = seq->private; in cctrl_tbl_show()
865 return -ENOMEM; in cctrl_tbl_show()
876 adap->params.a_wnd[i], in cctrl_tbl_show()
877 dec_fac[adap->params.b_wnd[i]]); in cctrl_tbl_show()
906 struct adapter *adap = seq->private; in clk_show()
907 unsigned int cclk_ps = 1000000000 / adap->params.vpd.cclk; /* in ps */ in clk_show()
999 struct devlog_info *dinfo = seq->private; in devlog_show()
1000 int fidx = (uintptr_t)v - 2; in devlog_show()
1007 index = dinfo->first + fidx; in devlog_show()
1008 if (index >= dinfo->nentries) in devlog_show()
1009 index -= dinfo->nentries; in devlog_show()
1010 e = &dinfo->log[index]; in devlog_show()
1011 if (e->timestamp == 0) in devlog_show()
1019 be32_to_cpu(e->seqno), in devlog_show()
1020 be64_to_cpu(e->timestamp), in devlog_show()
1021 (e->level < ARRAY_SIZE(devlog_level_strings) in devlog_show()
1022 ? devlog_level_strings[e->level] in devlog_show()
1024 (e->facility < ARRAY_SIZE(devlog_facility_strings) in devlog_show()
1025 ? devlog_facility_strings[e->facility] in devlog_show()
1027 seq_printf(seq, e->fmt, in devlog_show()
1028 be32_to_cpu(e->params[0]), in devlog_show()
1029 be32_to_cpu(e->params[1]), in devlog_show()
1030 be32_to_cpu(e->params[2]), in devlog_show()
1031 be32_to_cpu(e->params[3]), in devlog_show()
1032 be32_to_cpu(e->params[4]), in devlog_show()
1033 be32_to_cpu(e->params[5]), in devlog_show()
1034 be32_to_cpu(e->params[6]), in devlog_show()
1035 be32_to_cpu(e->params[7])); in devlog_show()
1044 if (pos > dinfo->nentries) in devlog_get_idx()
1052 struct devlog_info *dinfo = seq->private; in devlog_start()
1061 struct devlog_info *dinfo = seq->private; in devlog_next()
1083 struct adapter *adap = inode->i_private; in devlog_open()
1084 struct devlog_params *dparams = &adap->params.devlog; in devlog_open()
1092 if (dparams->start == 0) in devlog_open()
1093 return -ENXIO; in devlog_open()
1099 sizeof(*dinfo) + dparams->size); in devlog_open()
1101 return -ENOMEM; in devlog_open()
1105 dinfo->nentries = (dparams->size / sizeof(struct fw_devlog_e)); in devlog_open()
1106 dinfo->first = 0; in devlog_open()
1107 spin_lock(&adap->win0_lock); in devlog_open()
1108 ret = t4_memory_rw(adap, adap->params.drv_memwin, dparams->memtype, in devlog_open()
1109 dparams->start, dparams->size, (__be32 *)dinfo->log, in devlog_open()
1111 spin_unlock(&adap->win0_lock); in devlog_open()
1120 for (fseqno = ~((u32)0), index = 0; index < dinfo->nentries; index++) { in devlog_open()
1121 struct fw_devlog_e *e = &dinfo->log[index]; in devlog_open()
1124 if (e->timestamp == 0) in devlog_open()
1127 seqno = be32_to_cpu(e->seqno); in devlog_open()
1130 dinfo->first = index; in devlog_open()
1156 struct adapter *adapter = seq->private; in mboxlog_show()
1157 struct mbox_cmd_log *log = adapter->mbox_log; in mboxlog_show()
1169 entry_idx = log->cursor + ((uintptr_t)v - 2); in mboxlog_show()
1170 if (entry_idx >= log->size) in mboxlog_show()
1171 entry_idx -= log->size; in mboxlog_show()
1175 if (entry->timestamp == 0) in mboxlog_show()
1179 entry->seqno, entry->timestamp, in mboxlog_show()
1180 entry->access, entry->execute); in mboxlog_show()
1182 u64 flit = entry->cmd[i]; in mboxlog_show()
1194 struct adapter *adapter = seq->private; in mboxlog_get_idx()
1195 struct mbox_cmd_log *log = adapter->mbox_log; in mboxlog_get_idx()
1197 return ((pos <= log->size) ? (void *)(uintptr_t)(pos + 1) : NULL); in mboxlog_get_idx()
1227 struct seq_file *seq = file->private_data; in mboxlog_open()
1229 seq->private = inode->i_private; in mboxlog_open()
1248 unsigned int mbox = (uintptr_t)seq->private & 7; in mbox_show()
1249 struct adapter *adap = seq->private - mbox; in mbox_show()
1250 void __iomem *addr = adap->regs + PF_REG(mbox, CIM_PF_MAILBOX_DATA_A); in mbox_show()
1256 if (is_t4(adap->params.chip)) { in mbox_show()
1260 void __iomem *ctrl = adap->regs + PF_REG(mbox, ctrl_reg); in mbox_show()
1275 return single_open(file, mbox_show, inode->i_private); in mbox_open()
1290 if (count > sizeof(s) - 1 || !count) in mbox_write()
1291 return -EINVAL; in mbox_write()
1293 return -EFAULT; in mbox_write()
1299 return -EINVAL; in mbox_write()
1302 mbox = (uintptr_t)ino->i_private & 7; in mbox_write()
1303 adap = ino->i_private - mbox; in mbox_write()
1304 addr = adap->regs + PF_REG(mbox, CIM_PF_MAILBOX_DATA_A); in mbox_write()
1308 return -EBUSY; in mbox_write()
1330 unsigned int trcidx = (uintptr_t)seq->private & 3; in mps_trc_show()
1331 struct adapter *adap = seq->private - trcidx; in mps_trc_show()
1340 dev_err(adap->pdev_dev, "illegal trace pattern skip offset\n"); in mps_trc_show()
1341 return -EINVAL; in mps_trc_show()
1344 i = adap->chan_map[tp.port & 3]; in mps_trc_show()
1346 dev_err(adap->pdev_dev, "tracer %u is assigned " in mps_trc_show()
1347 "to non-existing port\n", trcidx); in mps_trc_show()
1348 return -EINVAL; in mps_trc_show()
1351 adap->port[i]->name, tp.port < 4 ? "Rx" : "Tx"); in mps_trc_show()
1354 tp.port - 8); in mps_trc_show()
1382 return single_open(file, mps_trc_show, inode->i_private); in mps_trc_open()
1387 return isdigit(c) ? c - '0' : tolower(c) - 'a' + 10; in xdigit2int()
1424 trcidx = (uintptr_t)ino->i_private & 3; in mps_trc_write()
1425 adap = ino->i_private - trcidx; in mps_trc_write()
1431 return -EFBIG; in mps_trc_write()
1434 return -ENOMEM; in mps_trc_write()
1436 count = -EFAULT; in mps_trc_write()
1440 if (s[count - 1] == '\n') in mps_trc_write()
1441 s[count - 1] = '\0'; in mps_trc_write()
1448 if (adap->trace_rss) in mps_trc_write()
1469 if (!adap->trace_rss) { in mps_trc_write()
1497 inval: count = -EINVAL; in mps_trc_write()
1518 tp.port = word[8] - '0' + 8; in mps_trc_write()
1524 tp.port = word[2] - '0' + 4; in mps_trc_write()
1525 if (adap->chan_map[tp.port & 3] >= MAX_NPORTS) in mps_trc_write()
1532 tp.port = word[2] - '0'; in mps_trc_write()
1533 if (adap->chan_map[tp.port] >= MAX_NPORTS) in mps_trc_write()
1553 count = -EFBIG; in mps_trc_write()
1572 for ( ; i - j >= 8; j += 8) in mps_trc_write()
1575 *mask = (1 << (i % 8) * 4) - 1; in mps_trc_write()
1587 if (j - tp.skip_ofst > 31) /* skip too big */ in mps_trc_write()
1589 tp.skip_len = j - tp.skip_ofst; in mps_trc_write()
1592 *data <<= (8 - i % 8) * 4; in mps_trc_write()
1593 *mask <<= (8 - i % 8) * 4; in mps_trc_write()
1594 i = (i + 15) & ~15; /* 8-byte align */ in mps_trc_write()
1623 loff_t avail = file_inode(file)->i_size; in flash_read()
1624 struct adapter *adap = file->private_data; in flash_read()
1627 return -EINVAL; in flash_read()
1630 if (count > avail - pos) in flash_read()
1631 count = avail - pos; in flash_read()
1640 ret = t4_read_flash(adap, pos - ofst, (len + 3) / 4, in flash_read()
1645 len -= ofst; in flash_read()
1647 return -EFAULT; in flash_read()
1651 count -= len; in flash_read()
1653 count = pos - *ppos; in flash_read()
1674 struct adapter *adap = seq->private; in mps_tcam_show()
1675 unsigned int chip_ver = CHELSIO_CHIP_VERSION(adap->params.chip); in mps_tcam_show()
1685 if (adap->params.arch.mps_rplc_size > 128) in mps_tcam_show()
1699 unsigned int idx = (uintptr_t)v - 2; in mps_tcam_show()
1707 /* CtlCmdType - 0: Read, 1: Write in mps_tcam_show()
1708 * CtlTcamSel - 0: TCAM0, 1: TCAM1 in mps_tcam_show()
1709 * CtlXYBitSel- 0: Y bit, 1: X bit in mps_tcam_show()
1717 ctl |= CTLTCAMINDEX_V(idx - 256) | in mps_tcam_show()
1725 /* 0 - Outer header, 1 - Inner header in mps_tcam_show()
1762 seq_printf(seq, "%3u -\n", idx); in mps_tcam_show()
1790 ret = t4_wr_mbox(adap, adap->mbox, &ldst_cmd, in mps_tcam_show()
1793 dev_warn(adap->pdev_dev, "Can't read MPS " in mps_tcam_show()
1795 idx, -ret); in mps_tcam_show()
1802 if (adap->params.arch.mps_rplc_size > 128) { in mps_tcam_show()
1816 "%3u %pM %012llx %06x %06x - - %3c 'I' %4x %3c %#x%4u%4d", in mps_tcam_show()
1826 T6_VF_G(cls_lo) : -1); in mps_tcam_show()
1829 "%3u %pM %012llx - - ", in mps_tcam_show()
1836 seq_puts(seq, " - N "); in mps_tcam_show()
1839 "- %3c %4x %3c %#x%4u%4d", in mps_tcam_show()
1845 T6_VF_G(cls_lo) : -1); in mps_tcam_show()
1853 (cls_lo & VF_VALID_F) ? VF_G(cls_lo) : -1); in mps_tcam_show()
1856 if (adap->params.arch.mps_rplc_size > 128) in mps_tcam_show()
1865 if (adap->params.arch.mps_rplc_size > 128) in mps_tcam_show()
1889 struct adapter *adap = seq->private; in mps_tcam_get_idx()
1890 int max_mac_addr = is_t4(adap->params.chip) ? in mps_tcam_get_idx()
1923 struct seq_file *seq = file->private_data; in mps_tcam_open()
1925 seq->private = inode->i_private; in mps_tcam_open()
1942 struct adapter *adap = seq->private; in sensors_show()
1955 ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 2, in sensors_show()
1991 struct adapter *adap = inode->i_private; in rss_open()
1998 return -ENOMEM; in rss_open()
2000 ret = t4_read_rss(adap, (u16 *)p->data); in rss_open()
2019 * argument is non-zero.
2031 struct adapter *adapter = seq->private; in rss_config_show()
2034 "global and per-VF scramble", in rss_config_show()
2035 "per-PF and per-VF scramble", in rss_config_show()
2036 "per-VF and per-VF scramble", in rss_config_show()
2094 if (CHELSIO_CHIP_VERSION(adapter->params.chip) > CHELSIO_T5) { in rss_config_show()
2122 if (CHELSIO_CHIP_VERSION(adapter->params.chip) > CHELSIO_T5) { in rss_config_show()
2136 if (CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5) in rss_config_show()
2185 t4_read_rss_key(seq->private, key, true); in rss_key_show()
2194 return single_open(file, rss_key_show, inode->i_private); in rss_key_open()
2203 struct adapter *adap = file_inode(file)->i_private; in rss_key_write()
2205 if (count > sizeof(s) - 1) in rss_key_write()
2206 return -EINVAL; in rss_key_write()
2208 return -EFAULT; in rss_key_write()
2209 for (i = count; i > 0 && isspace(s[i - 1]); i--) in rss_key_write()
2213 for (p = s, i = 9; i >= 0; i--) { in rss_key_write()
2217 return -EINVAL; in rss_key_write()
2222 t4_write_rss_key(adap, key, -1, true); in rss_key_write()
2250 pfconf = seq->private + offsetof(struct seq_tab, data); in rss_pf_config_show()
2252 LKPIDXSIZE_G(pfconf->rss_pf_map)); in rss_pf_config_show()
2266 yesno(pfconf->rss_pf_config & MAPENABLE_F), in rss_pf_config_show()
2267 yesno(pfconf->rss_pf_config & CHNENABLE_F), in rss_pf_config_show()
2268 yesno(pfconf->rss_pf_config & PRTENABLE_F), in rss_pf_config_show()
2269 G_PFnLKPIDX(pfconf->rss_pf_map, idx), in rss_pf_config_show()
2270 G_PFnMSKSIZE(pfconf->rss_pf_mask, idx), in rss_pf_config_show()
2271 IVFWIDTH_G(pfconf->rss_pf_config), in rss_pf_config_show()
2272 yesno(pfconf->rss_pf_config & IP6FOURTUPEN_F), in rss_pf_config_show()
2273 yesno(pfconf->rss_pf_config & IP6TWOTUPEN_F), in rss_pf_config_show()
2274 yesno(pfconf->rss_pf_config & IP4FOURTUPEN_F), in rss_pf_config_show()
2275 yesno(pfconf->rss_pf_config & IP4TWOTUPEN_F), in rss_pf_config_show()
2276 yesno(pfconf->rss_pf_config & UDPFOURTUPEN_F), in rss_pf_config_show()
2277 CH1DEFAULTQUEUE_G(pfconf->rss_pf_config), in rss_pf_config_show()
2278 CH0DEFAULTQUEUE_G(pfconf->rss_pf_config)); in rss_pf_config_show()
2288 struct adapter *adapter = inode->i_private; in rss_pf_config_open()
2296 return -ENOMEM; in rss_pf_config_open()
2298 pfconf = (struct rss_pf_conf *)p->data; in rss_pf_config_open()
2337 yesno(vfconf->rss_vf_vfh & VFCHNEN_F), in rss_vf_config_show()
2338 yesno(vfconf->rss_vf_vfh & VFPRTEN_F), in rss_vf_config_show()
2339 VFLKPIDX_G(vfconf->rss_vf_vfh), in rss_vf_config_show()
2340 yesno(vfconf->rss_vf_vfh & VFVLNEX_F), in rss_vf_config_show()
2341 yesno(vfconf->rss_vf_vfh & VFUPEN_F), in rss_vf_config_show()
2342 yesno(vfconf->rss_vf_vfh & VFIP4FOURTUPEN_F), in rss_vf_config_show()
2343 yesno(vfconf->rss_vf_vfh & VFIP6TWOTUPEN_F), in rss_vf_config_show()
2344 yesno(vfconf->rss_vf_vfh & VFIP4FOURTUPEN_F), in rss_vf_config_show()
2345 yesno(vfconf->rss_vf_vfh & VFIP4TWOTUPEN_F), in rss_vf_config_show()
2346 yesno(vfconf->rss_vf_vfh & ENABLEUDPHASH_F), in rss_vf_config_show()
2347 DEFAULTQUEUE_G(vfconf->rss_vf_vfh), in rss_vf_config_show()
2348 KEYINDEX_G(vfconf->rss_vf_vfh), in rss_vf_config_show()
2349 vfconf->rss_vf_vfl); in rss_vf_config_show()
2356 struct adapter *adapter = inode->i_private; in rss_vf_config_open()
2359 int vf, vfcount = adapter->params.arch.vfcount; in rss_vf_config_open()
2363 return -ENOMEM; in rss_vf_config_open()
2365 vfconf = (struct rss_vf_conf *)p->data; in rss_vf_config_open()
2387 struct adapter *adap = seq->private; in dcb_info_show()
2392 int port = (uintptr_t)v - 2; in dcb_info_show()
2393 struct net_device *dev = adap->port[port]; in dcb_info_show()
2395 struct port_dcb_info *dcb = &pi->dcb; in dcb_info_show()
2404 dcb_ver_array[dcb->dcb_version]); in dcb_info_show()
2406 if (dcb->msgs) { in dcb_info_show()
2415 if (dcb->msgs & CXGB4_DCB_FW_PGID) { in dcb_info_show()
2420 pgid = (dcb->pgid >> 4 * (7 - prio)) & 0xf; in dcb_info_show()
2426 if (dcb->msgs & CXGB4_DCB_FW_PGRATE) { in dcb_info_show()
2431 seq_printf(seq, " %3d", dcb->pgrate[pg]); in dcb_info_show()
2434 if (dcb->dcb_version == FW_PORT_DCB_VER_IEEE) { in dcb_info_show()
2437 seq_printf(seq, " %3d", dcb->tsa[pg]); in dcb_info_show()
2442 dcb->pg_num_tcs_supported); in dcb_info_show()
2447 if (dcb->msgs & CXGB4_DCB_FW_PRIORATE) { in dcb_info_show()
2452 seq_printf(seq, " %3d", dcb->priorate[prio]); in dcb_info_show()
2456 if (dcb->msgs & CXGB4_DCB_FW_PFC) { in dcb_info_show()
2461 int pfcen = (dcb->pfcen >> 1 * (7 - prio)) in dcb_info_show()
2468 dcb->pfc_num_tcs_supported); in dcb_info_show()
2473 if (dcb->msgs & CXGB4_DCB_FW_APP_ID) { in dcb_info_show()
2490 ap = &dcb->app_priority[app]; in dcb_info_show()
2492 if (ap->protocolid == 0) in dcb_info_show()
2496 if (ap->sel_field < ARRAY_SIZE(sel_names)) in dcb_info_show()
2497 sel_name = sel_names[ap->sel_field]; in dcb_info_show()
2501 seq_printf(seq, " %3d %#04x %-10s (%d) %#06x (%d)\n", in dcb_info_show()
2503 ap->user_prio_map, in dcb_info_show()
2504 sel_name, ap->sel_field, in dcb_info_show()
2505 ap->protocolid, ap->protocolid); in dcb_info_show()
2508 seq_puts(seq, " --- None ---\n"); in dcb_info_show()
2516 return (pos <= adap->params.nports in dcb_info_get_idx()
2523 struct adapter *adap = seq->private; in dcb_info_start()
2536 struct adapter *adap = seq->private; in dcb_info_next()
2554 struct seq_file *seq = file->private_data; in dcb_info_open()
2556 seq->private = inode->i_private; in dcb_info_open()
2572 struct adapter *adapter = seq->private; in resources_show()
2573 struct pf_resources *pfres = &adapter->params.pfres; in resources_show()
2576 seq_printf(seq, "%-60s " fmt "\n", \ in resources_show()
2577 desc " (" #var "):", pfres->var) in resources_show()
2597 * ethqset2pinfo - return port_info of an Ethernet Queue Set
2608 if (qset >= pi->first_qset && in ethqset2pinfo()
2609 qset < pi->first_qset + pi->nqsets) in ethqset2pinfo()
2620 const struct sge_uld_txq_info *utxq_info = adap->sge.uld_txq_info[uld]; in sge_qinfo_uld_txq_entries()
2625 return DIV_ROUND_UP(utxq_info->ntxq, 4); in sge_qinfo_uld_txq_entries()
2631 const struct sge_uld_rxq_info *urxq_info = adap->sge.uld_rxq_info[uld]; in sge_qinfo_uld_rspq_entries()
2636 return ciq ? DIV_ROUND_UP(urxq_info->nciq, 4) : in sge_qinfo_uld_rspq_entries()
2637 DIV_ROUND_UP(urxq_info->nrxq, 4); in sge_qinfo_uld_rspq_entries()
2659 struct adapter *adap = seq->private; in sge_qinfo_show()
2660 int i, j, n, r = (uintptr_t)v - 1; in sge_qinfo_show()
2661 struct sge *s = &adap->sge; in sge_qinfo_show()
2663 eth_entries = DIV_ROUND_UP(adap->sge.ethqsets, 4); in sge_qinfo_show()
2671 seq_printf(seq, "%-12s", s); \ in sge_qinfo_show()
2686 const struct sge_eth_rxq *rx = &s->ethrxq[base_qset]; in sge_qinfo_show()
2687 const struct sge_eth_txq *tx = &s->ethtxq[base_qset]; in sge_qinfo_show()
2689 n = min(4, s->ethqsets - 4 * r); in sge_qinfo_show()
2693 rx[i].rspq.netdev ? rx[i].rspq.netdev->name : "N/A"); in sge_qinfo_show()
2702 (ethqset2pinfo(adap, base_qset + i)->dcb.pgid >> in sge_qinfo_show()
2703 4*(7-tx[i].dcb_prio)) & 0xf); in sge_qinfo_show()
2705 (ethqset2pinfo(adap, base_qset + i)->dcb.pfcen >> in sge_qinfo_show()
2706 1*(7-tx[i].dcb_prio)) & 0x1); in sge_qinfo_show()
2714 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
2716 R("FL size:", fl.size - 8); in sge_qinfo_show()
2744 r -= eth_entries; in sge_qinfo_show()
2749 mutex_lock(&pi->vi_mirror_mutex); in sge_qinfo_show()
2750 if (!pi->vi_mirror_count) { in sge_qinfo_show()
2751 mutex_unlock(&pi->vi_mirror_mutex); in sge_qinfo_show()
2755 if (r >= DIV_ROUND_UP(pi->nmirrorqsets, 4)) { in sge_qinfo_show()
2756 r -= DIV_ROUND_UP(pi->nmirrorqsets, 4); in sge_qinfo_show()
2757 mutex_unlock(&pi->vi_mirror_mutex); in sge_qinfo_show()
2761 rx = &s->mirror_rxq[j][r * 4]; in sge_qinfo_show()
2762 n = min(4, pi->nmirrorqsets - 4 * r); in sge_qinfo_show()
2764 S("QType:", "Mirror-Rxq"); in sge_qinfo_show()
2766 rx[i].rspq.netdev ? rx[i].rspq.netdev->name : "N/A"); in sge_qinfo_show()
2773 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
2775 R("FL size:", fl.size - 8); in sge_qinfo_show()
2793 mutex_unlock(&pi->vi_mirror_mutex); in sge_qinfo_show()
2797 if (!adap->tc_mqprio) in sge_qinfo_show()
2800 mutex_lock(&adap->tc_mqprio->mqprio_mutex); in sge_qinfo_show()
2801 if (!refcount_read(&adap->tc_mqprio->refcnt)) { in sge_qinfo_show()
2802 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in sge_qinfo_show()
2806 eohw_entries = DIV_ROUND_UP(adap->sge.eoqsets, 4); in sge_qinfo_show()
2809 const struct sge_ofld_rxq *rx = &s->eohw_rxq[base_qset]; in sge_qinfo_show()
2810 const struct sge_eohw_txq *tx = &s->eohw_txq[base_qset]; in sge_qinfo_show()
2812 n = min(4, s->eoqsets - 4 * r); in sge_qinfo_show()
2816 rx[i].rspq.netdev ? rx[i].rspq.netdev->name : "N/A"); in sge_qinfo_show()
2828 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
2830 S3("u", "FL size:", rx->fl.size ? rx->fl.size - 8 : 0); in sge_qinfo_show()
2852 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in sge_qinfo_show()
2856 r -= eohw_entries; in sge_qinfo_show()
2857 for (j = 0; j < adap->params.nports; j++) { in sge_qinfo_show()
2861 port_mqprio = &adap->tc_mqprio->port_mqprio[j]; in sge_qinfo_show()
2863 for (tc = 0; tc < port_mqprio->mqprio.qopt.num_tc; tc++) in sge_qinfo_show()
2864 entries += port_mqprio->mqprio.qopt.count[tc]; in sge_qinfo_show()
2873 n = min(4, entries - 4 * r); in sge_qinfo_show()
2874 tx = &port_mqprio->eosw_txq[4 * r]; in sge_qinfo_show()
2876 S("QType:", "EOSW-TXQ"); in sge_qinfo_show()
2878 adap->port[j] ? adap->port[j]->name : "N/A"); in sge_qinfo_show()
2883 T("In-Use:", inuse); in sge_qinfo_show()
2886 T("Last-Compl:", last_compl); in sge_qinfo_show()
2888 T("Last-PIDX:", last_pidx); in sge_qinfo_show()
2890 T("Last-CIDX:", last_cidx); in sge_qinfo_show()
2891 T("FLOWC-IDX:", flowc_idx); in sge_qinfo_show()
2893 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in sge_qinfo_show()
2897 r -= eosw_entries; in sge_qinfo_show()
2899 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in sge_qinfo_show()
2906 if (s->uld_txq_info) in sge_qinfo_show()
2910 if (s->uld_rxq_info) { in sge_qinfo_show()
2920 utxq_info = s->uld_txq_info[CXGB4_TX_OFLD]; in sge_qinfo_show()
2921 tx = &utxq_info->uldtxq[r * 4]; in sge_qinfo_show()
2922 n = min(4, utxq_info->ntxq - 4 * r); in sge_qinfo_show()
2924 S("QType:", "OFLD-TXQ"); in sge_qinfo_show()
2934 r -= uld_txq_entries[CXGB4_TX_OFLD]; in sge_qinfo_show()
2938 urxq_info = s->uld_rxq_info[CXGB4_ULD_RDMA]; in sge_qinfo_show()
2939 rx = &urxq_info->uldrxq[r * 4]; in sge_qinfo_show()
2940 n = min(4, urxq_info->nrxq - 4 * r); in sge_qinfo_show()
2942 S("QType:", "RDMA-CPL"); in sge_qinfo_show()
2944 rx[i].rspq.netdev ? rx[i].rspq.netdev->name : "N/A"); in sge_qinfo_show()
2951 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
2953 R("FL size:", fl.size - 8); in sge_qinfo_show()
2962 r -= uld_rxq_entries[CXGB4_ULD_RDMA]; in sge_qinfo_show()
2967 urxq_info = s->uld_rxq_info[CXGB4_ULD_RDMA]; in sge_qinfo_show()
2968 ciq_idx = urxq_info->nrxq + (r * 4); in sge_qinfo_show()
2969 rx = &urxq_info->uldrxq[ciq_idx]; in sge_qinfo_show()
2970 n = min(4, urxq_info->nciq - 4 * r); in sge_qinfo_show()
2972 S("QType:", "RDMA-CIQ"); in sge_qinfo_show()
2974 rx[i].rspq.netdev ? rx[i].rspq.netdev->name : "N/A"); in sge_qinfo_show()
2981 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
2986 r -= uld_ciq_entries[CXGB4_ULD_RDMA]; in sge_qinfo_show()
2990 urxq_info = s->uld_rxq_info[CXGB4_ULD_ISCSI]; in sge_qinfo_show()
2991 rx = &urxq_info->uldrxq[r * 4]; in sge_qinfo_show()
2992 n = min(4, urxq_info->nrxq - 4 * r); in sge_qinfo_show()
3001 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
3003 R("FL size:", fl.size - 8); in sge_qinfo_show()
3012 r -= uld_rxq_entries[CXGB4_ULD_ISCSI]; in sge_qinfo_show()
3016 urxq_info = s->uld_rxq_info[CXGB4_ULD_ISCSIT]; in sge_qinfo_show()
3017 rx = &urxq_info->uldrxq[r * 4]; in sge_qinfo_show()
3018 n = min(4, urxq_info->nrxq - 4 * r); in sge_qinfo_show()
3027 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
3029 R("FL size:", fl.size - 8); in sge_qinfo_show()
3038 r -= uld_rxq_entries[CXGB4_ULD_ISCSIT]; in sge_qinfo_show()
3042 urxq_info = s->uld_rxq_info[CXGB4_ULD_TLS]; in sge_qinfo_show()
3043 rx = &urxq_info->uldrxq[r * 4]; in sge_qinfo_show()
3044 n = min(4, urxq_info->nrxq - 4 * r); in sge_qinfo_show()
3053 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
3055 R("FL size:", fl.size - 8); in sge_qinfo_show()
3064 r -= uld_rxq_entries[CXGB4_ULD_TLS]; in sge_qinfo_show()
3069 utxq_info = s->uld_txq_info[CXGB4_TX_CRYPTO]; in sge_qinfo_show()
3070 urxq_info = s->uld_rxq_info[CXGB4_ULD_CRYPTO]; in sge_qinfo_show()
3071 tx = &utxq_info->uldtxq[r * 4]; in sge_qinfo_show()
3072 rx = &urxq_info->uldrxq[r * 4]; in sge_qinfo_show()
3073 n = min(4, utxq_info->ntxq - 4 * r); in sge_qinfo_show()
3087 S3("u", "Intr pktcnt:", s->counter_val[rx[i].rspq.pktcnt_idx]); in sge_qinfo_show()
3089 R("FL size:", fl.size - 8); in sge_qinfo_show()
3098 r -= uld_txq_entries[CXGB4_TX_CRYPTO]; in sge_qinfo_show()
3103 const struct sge_ctrl_txq *tx = &s->ctrlq[r * 4]; in sge_qinfo_show()
3105 n = min(4, adap->params.nports - 4 * r); in sge_qinfo_show()
3119 r -= ctrl_entries; in sge_qinfo_show()
3121 const struct sge_rspq *evtq = &s->fw_evtq; in sge_qinfo_show()
3123 seq_printf(seq, "%-12s %16s\n", "QType:", "FW event queue"); in sge_qinfo_show()
3124 seq_printf(seq, "%-12s %16u\n", "RspQ ID:", evtq->abs_id); in sge_qinfo_show()
3125 seq_printf(seq, "%-12s %16u\n", "RspQ size:", evtq->size); in sge_qinfo_show()
3126 seq_printf(seq, "%-12s %16u\n", "RspQE size:", evtq->iqe_len); in sge_qinfo_show()
3127 seq_printf(seq, "%-12s %16u\n", "RspQ CIDX:", evtq->cidx); in sge_qinfo_show()
3128 seq_printf(seq, "%-12s %16u\n", "RspQ Gen:", evtq->gen); in sge_qinfo_show()
3129 seq_printf(seq, "%-12s %16u\n", "Intr delay:", in sge_qinfo_show()
3131 seq_printf(seq, "%-12s %16u\n", "Intr pktcnt:", in sge_qinfo_show()
3132 s->counter_val[evtq->pktcnt_idx]); in sge_qinfo_show()
3158 if (adap->tc_mqprio) { in sge_queue_entries()
3162 mutex_lock(&adap->tc_mqprio->mqprio_mutex); in sge_queue_entries()
3163 if (adap->sge.eohw_txq) in sge_queue_entries()
3164 eohw_entries = DIV_ROUND_UP(adap->sge.eoqsets, 4); in sge_queue_entries()
3166 for (i = 0; i < adap->params.nports; i++) { in sge_queue_entries()
3169 port_mqprio = &adap->tc_mqprio->port_mqprio[i]; in sge_queue_entries()
3170 for (tc = 0; tc < port_mqprio->mqprio.qopt.num_tc; tc++) in sge_queue_entries()
3171 entries += port_mqprio->mqprio.qopt.count[tc]; in sge_queue_entries()
3176 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in sge_queue_entries()
3182 mutex_lock(&pi->vi_mirror_mutex); in sge_queue_entries()
3183 if (pi->vi_mirror_count) in sge_queue_entries()
3184 mirror_rxq_entries += DIV_ROUND_UP(pi->nmirrorqsets, 4); in sge_queue_entries()
3185 mutex_unlock(&pi->vi_mirror_mutex); in sge_queue_entries()
3202 return DIV_ROUND_UP(adap->sge.ethqsets, 4) + mirror_rxq_entries + in sge_queue_entries()
3209 int entries = sge_queue_entries(seq->private); in sge_queue_start()
3220 int entries = sge_queue_entries(seq->private); in sge_queue_next()
3238 struct seq_file *seq = file->private_data; in sge_qinfo_open()
3240 seq->private = inode->i_private; in sge_qinfo_open()
3258 file->private_data = inode->i_private; in mem_open()
3260 mem = (uintptr_t)file->private_data & 0x7; in mem_open()
3261 adap = file->private_data - mem; in mem_open()
3272 loff_t avail = file_inode(file)->i_size; in mem_read()
3273 unsigned int mem = (uintptr_t)file->private_data & 0x7; in mem_read()
3274 struct adapter *adap = file->private_data - mem; in mem_read()
3279 return -EINVAL; in mem_read()
3282 if (count > avail - pos) in mem_read()
3283 count = avail - pos; in mem_read()
3287 return -ENOMEM; in mem_read()
3289 spin_lock(&adap->win0_lock); in mem_read()
3291 spin_unlock(&adap->win0_lock); in mem_read()
3300 return -EFAULT; in mem_read()
3314 struct adapter *adap = seq->private; in tid_info_show()
3318 t = &adap->tids; in tid_info_show()
3319 chip = CHELSIO_CHIP_VERSION(adap->params.chip); in tid_info_show()
3323 atomic_read(&t->conns_in_use)); in tid_info_show()
3331 seq_printf(seq, "TID range: %u..%u/%u..%u", t->tid_base, in tid_info_show()
3332 sb - 1, adap->tids.hash_base, in tid_info_show()
3333 t->tid_base + t->ntids - 1); in tid_info_show()
3335 atomic_read(&t->tids_in_use), in tid_info_show()
3336 atomic_read(&t->hash_tids_in_use)); in tid_info_show()
3337 } else if (adap->flags & CXGB4_FW_OFLD_CONN) { in tid_info_show()
3339 t->aftid_base, in tid_info_show()
3340 t->aftid_end, in tid_info_show()
3341 adap->tids.hash_base, in tid_info_show()
3342 t->tid_base + t->ntids - 1); in tid_info_show()
3344 atomic_read(&t->tids_in_use), in tid_info_show()
3345 atomic_read(&t->hash_tids_in_use)); in tid_info_show()
3348 adap->tids.hash_base, in tid_info_show()
3349 t->tid_base + t->ntids - 1); in tid_info_show()
3351 atomic_read(&t->hash_tids_in_use)); in tid_info_show()
3353 } else if (t->ntids) { in tid_info_show()
3355 atomic_read(&t->conns_in_use)); in tid_info_show()
3357 seq_printf(seq, "TID range: %u..%u", t->tid_base, in tid_info_show()
3358 t->tid_base + t->ntids - 1); in tid_info_show()
3360 atomic_read(&t->tids_in_use)); in tid_info_show()
3363 if (t->nstids) in tid_info_show()
3364 seq_printf(seq, "STID range: %u..%u, in use-IPv4/IPv6: %u/%u\n", in tid_info_show()
3365 (!t->stid_base && in tid_info_show()
3367 t->stid_base + 1 : t->stid_base, in tid_info_show()
3368 t->stid_base + t->nstids - 1, in tid_info_show()
3369 t->stids_in_use - t->v6_stids_in_use, in tid_info_show()
3370 t->v6_stids_in_use); in tid_info_show()
3372 if (t->natids) in tid_info_show()
3374 t->natids - 1, t->atids_in_use); in tid_info_show()
3375 seq_printf(seq, "FTID range: %u..%u\n", t->ftid_base, in tid_info_show()
3376 t->ftid_base + t->nftids - 1); in tid_info_show()
3377 if (t->nsftids) in tid_info_show()
3379 t->sftid_base, t->sftid_base + t->nsftids - 2, in tid_info_show()
3380 t->sftids_in_use); in tid_info_show()
3381 if (t->nhpftids) in tid_info_show()
3382 seq_printf(seq, "HPFTID range: %u..%u\n", t->hpftid_base, in tid_info_show()
3383 t->hpftid_base + t->nhpftids - 1); in tid_info_show()
3384 if (t->neotids) in tid_info_show()
3386 t->eotid_base, t->eotid_base + t->neotids - 1, in tid_info_show()
3387 atomic_read(&t->eotids_in_use)); in tid_info_show()
3388 if (t->ntids) in tid_info_show()
3399 debugfs_create_file_size(name, 0400, adap->debugfs_root, in add_debugfs_mem()
3408 const struct adapter *adap = filp->private_data; in blocked_fl_read()
3410 ssize_t size = (adap->sge.egr_sz + 3) / 4 + in blocked_fl_read()
3411 adap->sge.egr_sz / 32 + 2; /* includes ,/\n/\0 */ in blocked_fl_read()
3415 return -ENOMEM; in blocked_fl_read()
3417 len = snprintf(buf, size - 1, "%*pb\n", in blocked_fl_read()
3418 adap->sge.egr_sz, adap->sge.blocked_fl); in blocked_fl_read()
3430 struct adapter *adap = filp->private_data; in blocked_fl_write()
3432 t = bitmap_zalloc(adap->sge.egr_sz, GFP_KERNEL); in blocked_fl_write()
3434 return -ENOMEM; in blocked_fl_write()
3436 err = bitmap_parse_user(ubuf, count, t, adap->sge.egr_sz); in blocked_fl_write()
3442 bitmap_copy(adap->sge.blocked_fl, t, adap->sge.egr_sz); in blocked_fl_write()
3460 string_get_size((u64)to - from + 1, 1, STRING_UNITS_2, buf, in mem_region_show()
3462 seq_printf(seq, "%-15s %#x-%#x [%s]\n", name, from, to, buf); in mem_region_show()
3469 struct adapter *adap = seq->private; in meminfo_show()
3476 return -ENXIO; in meminfo_show()
3481 meminfo.avail[i].limit - 1); in meminfo_show()
3489 i < meminfo.mem_c - 1 ? in meminfo_show()
3490 meminfo.mem[i + 1].base - 1 : ~0; in meminfo_show()
3509 seq_printf(seq, "%u p-structs (%u free)\n\n", in meminfo_show()
3517 for (i = 0; i < adap->params.arch.nchan; i++) in meminfo_show()
3534 struct adapter *adap = seq->private; in chcr_stats_show()
3538 atomic_read(&adap->chcr_stats.cipher_rqst)); in chcr_stats_show()
3540 atomic_read(&adap->chcr_stats.digest_rqst)); in chcr_stats_show()
3542 atomic_read(&adap->chcr_stats.aead_rqst)); in chcr_stats_show()
3544 atomic_read(&adap->chcr_stats.complete)); in chcr_stats_show()
3546 atomic_read(&adap->chcr_stats.error)); in chcr_stats_show()
3548 atomic_read(&adap->chcr_stats.fallback)); in chcr_stats_show()
3550 atomic_read(&adap->chcr_stats.tls_pdu_tx)); in chcr_stats_show()
3552 atomic_read(&adap->chcr_stats.tls_pdu_rx)); in chcr_stats_show()
3554 atomic_read(&adap->chcr_stats.tls_key)); in chcr_stats_show()
3558 atomic_read(&adap->ch_ipsec_stats.ipsec_cnt)); in chcr_stats_show()
3563 refcount_read(&adap->chcr_ktls.ktls_refcount)); in chcr_stats_show()
3565 atomic64_read(&adap->ch_ktls_stats.ktls_tx_send_records)); in chcr_stats_show()
3567 atomic64_read(&adap->ch_ktls_stats.ktls_tx_start_pkts)); in chcr_stats_show()
3569 atomic64_read(&adap->ch_ktls_stats.ktls_tx_middle_pkts)); in chcr_stats_show()
3571 atomic64_read(&adap->ch_ktls_stats.ktls_tx_end_pkts)); in chcr_stats_show()
3573 atomic64_read(&adap->ch_ktls_stats.ktls_tx_complete_pkts)); in chcr_stats_show()
3575 atomic64_read(&adap->ch_ktls_stats.ktls_tx_trimmed_pkts)); in chcr_stats_show()
3577 atomic64_read(&adap->ch_ktls_stats.ktls_tx_fallback)); in chcr_stats_show()
3579 ktls_port = &adap->ch_ktls_stats.ktls_port[i]; in chcr_stats_show()
3582 atomic64_read(&ktls_port->ktls_tx_connection_open)); in chcr_stats_show()
3584 atomic64_read(&ktls_port->ktls_tx_connection_fail)); in chcr_stats_show()
3586 atomic64_read(&ktls_port->ktls_tx_connection_close)); in chcr_stats_show()
3595 seq_printf(seq, "%-25s %-20llu\n", (string), \
3600 seq_printf(seq, "%-25s ", (string)); \
3601 for (i = 0; i < adap->params.arch.nchan; i++) \
3602 seq_printf(seq, "%-20llu ", \
3609 seq_printf(seq, "%-25s ", (string)); \
3610 for (i = 0; i < adap->params.arch.nchan; i++) \
3611 seq_printf(seq, "%-20llu ", \
3618 struct adapter *adap = seq->private; in show_tcp_stats()
3621 spin_lock(&adap->stats_lock); in show_tcp_stats()
3623 spin_unlock(&adap->stats_lock); in show_tcp_stats()
3637 struct adapter *adap = seq->private; in show_ddp_stats()
3640 spin_lock(&adap->stats_lock); in show_ddp_stats()
3642 spin_unlock(&adap->stats_lock); in show_ddp_stats()
3651 struct adapter *adap = seq->private; in show_rdma_stats()
3654 spin_lock(&adap->stats_lock); in show_rdma_stats()
3656 spin_unlock(&adap->stats_lock); in show_rdma_stats()
3664 struct adapter *adap = seq->private; in show_tp_err_adapter_stats()
3667 spin_lock(&adap->stats_lock); in show_tp_err_adapter_stats()
3669 spin_unlock(&adap->stats_lock); in show_tp_err_adapter_stats()
3677 struct adapter *adap = seq->private; in show_cpl_stats()
3681 spin_lock(&adap->stats_lock); in show_cpl_stats()
3683 spin_unlock(&adap->stats_lock); in show_cpl_stats()
3691 struct adapter *adap = seq->private; in show_tp_err_channel_stats()
3695 spin_lock(&adap->stats_lock); in show_tp_err_channel_stats()
3697 spin_unlock(&adap->stats_lock); in show_tp_err_channel_stats()
3711 struct adapter *adap = seq->private; in show_fcoe_stats()
3715 spin_lock(&adap->stats_lock); in show_fcoe_stats()
3716 for (i = 0; i < adap->params.arch.nchan; i++) in show_fcoe_stats()
3718 spin_unlock(&adap->stats_lock); in show_fcoe_stats()
3731 struct adapter *adap = seq->private; in tp_stats_show()
3733 seq_puts(seq, "\n--------Adapter Stats--------\n"); in tp_stats_show()
3739 seq_puts(seq, "\n-------- Channel Stats --------\n"); in tp_stats_show()
3740 if (adap->params.arch.nchan == NCHAN) in tp_stats_show()
3741 seq_printf(seq, "%-25s %-20s %-20s %-20s %-20s\n", in tp_stats_show()
3745 seq_printf(seq, "%-25s %-20s %-20s\n", in tp_stats_show()
3766 adap->debugfs_root, in add_debugfs_files()
3846 if (!is_t4(adap->params.chip)) in t4_setup_debugfs()
3860 if (is_t5(adap->params.chip)) { in t4_setup_debugfs()
3885 debugfs_create_file_size("flash", 0400, adap->debugfs_root, adap, in t4_setup_debugfs()
3886 &flash_debugfs_fops, adap->params.sf_size); in t4_setup_debugfs()
3888 adap->debugfs_root, &adap->use_bd); in t4_setup_debugfs()
3890 adap->debugfs_root, &adap->trace_rss); in t4_setup_debugfs()