Commit 918341e0 authored by Ganesh Goudar's avatar Ganesh Goudar Committed by David S. Miller

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: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 748a7099
...@@ -2668,10 +2668,14 @@ static const struct file_operations mem_debugfs_fops = { ...@@ -2668,10 +2668,14 @@ static const struct file_operations mem_debugfs_fops = {
static int tid_info_show(struct seq_file *seq, void *v) static int tid_info_show(struct seq_file *seq, void *v)
{ {
unsigned int tid_start = 0;
struct adapter *adap = seq->private; struct adapter *adap = seq->private;
const struct tid_info *t = &adap->tids; const struct tid_info *t = &adap->tids;
enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip); enum chip_type chip = CHELSIO_CHIP_VERSION(adap->params.chip);
if (chip > CHELSIO_T5)
tid_start = t4_read_reg(adap, LE_DB_ACTIVE_TABLE_START_INDEX_A);
if (t4_read_reg(adap, LE_DB_CONFIG_A) & HASHEN_F) { if (t4_read_reg(adap, LE_DB_CONFIG_A) & HASHEN_F) {
unsigned int sb; unsigned int sb;
seq_printf(seq, "Connections in use: %u\n", seq_printf(seq, "Connections in use: %u\n",
...@@ -2683,8 +2687,8 @@ static int tid_info_show(struct seq_file *seq, void *v) ...@@ -2683,8 +2687,8 @@ static int tid_info_show(struct seq_file *seq, void *v)
sb = t4_read_reg(adap, LE_DB_SRVR_START_INDEX_A); sb = t4_read_reg(adap, LE_DB_SRVR_START_INDEX_A);
if (sb) { if (sb) {
seq_printf(seq, "TID range: 0..%u/%u..%u", sb - 1, seq_printf(seq, "TID range: %u..%u/%u..%u", tid_start,
adap->tids.hash_base, sb - 1, adap->tids.hash_base,
t->ntids - 1); t->ntids - 1);
seq_printf(seq, ", in use: %u/%u\n", seq_printf(seq, ", in use: %u/%u\n",
atomic_read(&t->tids_in_use), atomic_read(&t->tids_in_use),
...@@ -2709,7 +2713,8 @@ static int tid_info_show(struct seq_file *seq, void *v) ...@@ -2709,7 +2713,8 @@ static int tid_info_show(struct seq_file *seq, void *v)
seq_printf(seq, "Connections in use: %u\n", seq_printf(seq, "Connections in use: %u\n",
atomic_read(&t->conns_in_use)); atomic_read(&t->conns_in_use));
seq_printf(seq, "TID range: 0..%u", t->ntids - 1); seq_printf(seq, "TID range: %u..%u", tid_start,
tid_start + t->ntids - 1);
seq_printf(seq, ", in use: %u\n", seq_printf(seq, ", in use: %u\n",
atomic_read(&t->tids_in_use)); atomic_read(&t->tids_in_use));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment