cxgbe(4): Fix the tid range shown for T6 cards in misc.tids.

MFC after:	3 days
This commit is contained in:
Navdeep Parhar 2016-12-14 07:36:36 +00:00
parent de69dfbbbc
commit ca276276f1

View File

@ -7219,25 +7219,23 @@ sysctl_tids(SYSCTL_HANDLER_ARGS)
}
if (t->ntids) {
sbuf_printf(sb, "TID range: ");
if (t4_read_reg(sc, A_LE_DB_CONFIG) & F_HASHEN) {
uint32_t b;
uint32_t b, hb;
if (chip_id(sc) <= CHELSIO_T5)
if (chip_id(sc) <= CHELSIO_T5) {
b = t4_read_reg(sc, A_LE_DB_SERVER_INDEX) / 4;
else
b = t4_read_reg(sc, A_LE_DB_SRVR_START_INDEX);
if (b) {
sbuf_printf(sb, "TID range: 0-%u, %u-%u", b - 1,
t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4,
t->ntids - 1);
hb = t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4;
} else {
sbuf_printf(sb, "TID range: %u-%u",
t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4,
t->ntids - 1);
b = t4_read_reg(sc, A_LE_DB_SRVR_START_INDEX);
hb = t4_read_reg(sc, A_T6_LE_DB_HASH_TID_BASE);
}
if (b)
sbuf_printf(sb, "0-%u, ", b - 1);
sbuf_printf(sb, "%u-%u", hb, t->ntids - 1);
} else
sbuf_printf(sb, "TID range: 0-%u", t->ntids - 1);
sbuf_printf(sb, "0-%u", t->ntids - 1);
sbuf_printf(sb, ", in use: %u\n",
atomic_load_acq_int(&t->tids_in_use));
}