cxgbe(4): Provide accurate hit count for filters on T5 cards. The

location within the TCB and the size have both changed.

MFC after:	1 week
This commit is contained in:
np 2013-06-04 02:25:25 +00:00
parent 6b6c46b522
commit 9b1423fbd7

View File

@ -6573,9 +6573,15 @@ get_filter_hits(struct adapter *sc, uint32_t fid)
memwin_info(sc, 0, &mw_base, NULL); memwin_info(sc, 0, &mw_base, NULL);
off = position_memwin(sc, 0, off = position_memwin(sc, 0,
tcb_base + (fid + sc->tids.ftid_base) * TCB_SIZE); tcb_base + (fid + sc->tids.ftid_base) * TCB_SIZE);
hits = t4_read_reg64(sc, mw_base + off + 16); if (is_t4(sc)) {
hits = t4_read_reg64(sc, mw_base + off + 16);
hits = be64toh(hits);
} else {
hits = t4_read_reg(sc, mw_base + off + 24);
hits = be32toh(hits);
}
return (be64toh(hits)); return (hits);
} }
static int static int