diff options
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 36 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 4 |
5 files changed, 58 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index d827bb65103e..6e18b42cafb3 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | |||
@@ -1181,6 +1181,8 @@ void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4, | |||
1181 | void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, | 1181 | void t4_load_mtus(struct adapter *adap, const unsigned short *mtus, |
1182 | const unsigned short *alpha, const unsigned short *beta); | 1182 | const unsigned short *alpha, const unsigned short *beta); |
1183 | 1183 | ||
1184 | void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf); | ||
1185 | |||
1184 | void t4_mk_filtdelwr(unsigned int ftid, struct fw_filter_wr *wr, int qid); | 1186 | void t4_mk_filtdelwr(unsigned int ftid, struct fw_filter_wr *wr, int qid); |
1185 | 1187 | ||
1186 | void t4_wol_magic_enable(struct adapter *adap, unsigned int port, | 1188 | void t4_wol_magic_enable(struct adapter *adap, unsigned int port, |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c index 1304fe045e7c..5a462730bdbe 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | |||
@@ -562,6 +562,41 @@ static const struct file_operations tp_la_fops = { | |||
562 | .write = tp_la_write | 562 | .write = tp_la_write |
563 | }; | 563 | }; |
564 | 564 | ||
565 | static int ulprx_la_show(struct seq_file *seq, void *v, int idx) | ||
566 | { | ||
567 | const u32 *p = v; | ||
568 | |||
569 | if (v == SEQ_START_TOKEN) | ||
570 | seq_puts(seq, " Pcmd Type Message" | ||
571 | " Data\n"); | ||
572 | else | ||
573 | seq_printf(seq, "%08x%08x %4x %08x %08x%08x%08x%08x\n", | ||
574 | p[1], p[0], p[2], p[3], p[7], p[6], p[5], p[4]); | ||
575 | return 0; | ||
576 | } | ||
577 | |||
578 | static int ulprx_la_open(struct inode *inode, struct file *file) | ||
579 | { | ||
580 | struct seq_tab *p; | ||
581 | struct adapter *adap = inode->i_private; | ||
582 | |||
583 | p = seq_open_tab(file, ULPRX_LA_SIZE, 8 * sizeof(u32), 1, | ||
584 | ulprx_la_show); | ||
585 | if (!p) | ||
586 | return -ENOMEM; | ||
587 | |||
588 | t4_ulprx_read_la(adap, (u32 *)p->data); | ||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | static const struct file_operations ulprx_la_fops = { | ||
593 | .owner = THIS_MODULE, | ||
594 | .open = ulprx_la_open, | ||
595 | .read = seq_read, | ||
596 | .llseek = seq_lseek, | ||
597 | .release = seq_release_private | ||
598 | }; | ||
599 | |||
565 | /* Show the PM memory stats. These stats include: | 600 | /* Show the PM memory stats. These stats include: |
566 | * | 601 | * |
567 | * TX: | 602 | * TX: |
@@ -1867,6 +1902,7 @@ int t4_setup_debugfs(struct adapter *adap) | |||
1867 | { "obq_sge", &cim_obq_fops, S_IRUSR, 4 }, | 1902 | { "obq_sge", &cim_obq_fops, S_IRUSR, 4 }, |
1868 | { "obq_ncsi", &cim_obq_fops, S_IRUSR, 5 }, | 1903 | { "obq_ncsi", &cim_obq_fops, S_IRUSR, 5 }, |
1869 | { "tp_la", &tp_la_fops, S_IRUSR, 0 }, | 1904 | { "tp_la", &tp_la_fops, S_IRUSR, 0 }, |
1905 | { "ulprx_la", &ulprx_la_fops, S_IRUSR, 0 }, | ||
1870 | { "sensors", &sensors_debugfs_fops, S_IRUSR, 0 }, | 1906 | { "sensors", &sensors_debugfs_fops, S_IRUSR, 0 }, |
1871 | { "pm_stats", &pm_stats_debugfs_fops, S_IRUSR, 0 }, | 1907 | { "pm_stats", &pm_stats_debugfs_fops, S_IRUSR, 0 }, |
1872 | #if IS_ENABLED(CONFIG_IPV6) | 1908 | #if IS_ENABLED(CONFIG_IPV6) |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index e82c0ba66d55..9938f2aa5ef7 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |||
@@ -1263,6 +1263,21 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op) | |||
1263 | return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL); | 1263 | return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL); |
1264 | } | 1264 | } |
1265 | 1265 | ||
1266 | void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf) | ||
1267 | { | ||
1268 | unsigned int i, j; | ||
1269 | |||
1270 | for (i = 0; i < 8; i++) { | ||
1271 | u32 *p = la_buf + i; | ||
1272 | |||
1273 | t4_write_reg(adap, ULP_RX_LA_CTL_A, i); | ||
1274 | j = t4_read_reg(adap, ULP_RX_LA_WRPTR_A); | ||
1275 | t4_write_reg(adap, ULP_RX_LA_RDPTR_A, j); | ||
1276 | for (j = 0; j < ULPRX_LA_SIZE; j++, p += 8) | ||
1277 | *p = t4_read_reg(adap, ULP_RX_LA_RDDATA_A); | ||
1278 | } | ||
1279 | } | ||
1280 | |||
1266 | #define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ | 1281 | #define ADVERT_MASK (FW_PORT_CAP_SPEED_100M | FW_PORT_CAP_SPEED_1G |\ |
1267 | FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \ | 1282 | FW_PORT_CAP_SPEED_10G | FW_PORT_CAP_SPEED_40G | \ |
1268 | FW_PORT_CAP_ANEG) | 1283 | FW_PORT_CAP_ANEG) |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h index f0b98d7d74da..380b15c0417a 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h | |||
@@ -64,6 +64,7 @@ enum { | |||
64 | CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ | 64 | CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ |
65 | CIM_OBQ_SIZE = 128, /* # of 128-bit words in a CIM OBQ */ | 65 | CIM_OBQ_SIZE = 128, /* # of 128-bit words in a CIM OBQ */ |
66 | TPLA_SIZE = 128, /* # of 64-bit words in TP LA */ | 66 | TPLA_SIZE = 128, /* # of 64-bit words in TP LA */ |
67 | ULPRX_LA_SIZE = 512, /* # of 256-bit words in ULP_RX LA */ | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | enum { | 70 | enum { |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h index 15d0eccfa6ec..91e0ea1954f0 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | |||
@@ -2270,6 +2270,10 @@ | |||
2270 | #define ULP_RX_INT_CAUSE_A 0x19158 | 2270 | #define ULP_RX_INT_CAUSE_A 0x19158 |
2271 | #define ULP_RX_ISCSI_TAGMASK_A 0x19164 | 2271 | #define ULP_RX_ISCSI_TAGMASK_A 0x19164 |
2272 | #define ULP_RX_ISCSI_PSZ_A 0x19168 | 2272 | #define ULP_RX_ISCSI_PSZ_A 0x19168 |
2273 | #define ULP_RX_LA_CTL_A 0x1923c | ||
2274 | #define ULP_RX_LA_RDPTR_A 0x19240 | ||
2275 | #define ULP_RX_LA_RDDATA_A 0x19244 | ||
2276 | #define ULP_RX_LA_WRPTR_A 0x19248 | ||
2273 | 2277 | ||
2274 | #define HPZ3_S 24 | 2278 | #define HPZ3_S 24 |
2275 | #define HPZ3_V(x) ((x) << HPZ3_S) | 2279 | #define HPZ3_V(x) ((x) << HPZ3_S) |