Skip to content

Commit 918341e

Browse files
Ganesh Goudardavem330
authored andcommitted
cxgb4: Report tid start range correctly for T6
For T6, tid start range should be read from LE_DB_ACTIVE_TABLE_START_INDEX_A register. Signed-off-by: Arjun Vynipadath <[email protected]> Signed-off-by: Ganesh Goudar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 748a709 commit 918341e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,10 +2668,14 @@ static const struct file_operations mem_debugfs_fops = {
26682668

26692669
static int tid_info_show(struct seq_file *seq, void *v)
26702670
{
2671+
unsigned int tid_start = 0;
26712672
struct adapter *adap = seq->private;
26722673
const struct tid_info *t = &adap->tids;
26732674
enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip);
26742675

2676+
if (chip > CHELSIO_T5)
2677+
tid_start = t4_read_reg(adap, LE_DB_ACTIVE_TABLE_START_INDEX_A);
2678+
26752679
if (t4_read_reg(adap, LE_DB_CONFIG_A) & HASHEN_F) {
26762680
unsigned int sb;
26772681
seq_printf(seq, "Connections in use: %u\n",
@@ -2683,8 +2687,8 @@ static int tid_info_show(struct seq_file *seq, void *v)
26832687
sb = t4_read_reg(adap, LE_DB_SRVR_START_INDEX_A);
26842688

26852689
if (sb) {
2686-
seq_printf(seq, "TID range: 0..%u/%u..%u", sb - 1,
2687-
adap->tids.hash_base,
2690+
seq_printf(seq, "TID range: %u..%u/%u..%u", tid_start,
2691+
sb - 1, adap->tids.hash_base,
26882692
t->ntids - 1);
26892693
seq_printf(seq, ", in use: %u/%u\n",
26902694
atomic_read(&t->tids_in_use),
@@ -2709,7 +2713,8 @@ static int tid_info_show(struct seq_file *seq, void *v)
27092713
seq_printf(seq, "Connections in use: %u\n",
27102714
atomic_read(&t->conns_in_use));
27112715

2712-
seq_printf(seq, "TID range: 0..%u", t->ntids - 1);
2716+
seq_printf(seq, "TID range: %u..%u", tid_start,
2717+
tid_start + t->ntids - 1);
27132718
seq_printf(seq, ", in use: %u\n",
27142719
atomic_read(&t->tids_in_use));
27152720
}

0 commit comments

Comments
 (0)