svn commit: r251358 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Tue Jun 4 02:25:26 UTC 2013
Author: np
Date: Tue Jun 4 02:25:25 2013
New Revision: 251358
URL: http://svnweb.freebsd.org/changeset/base/251358
Log:
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
Modified:
head/sys/dev/cxgbe/t4_main.c
Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c Tue Jun 4 00:42:31 2013 (r251357)
+++ head/sys/dev/cxgbe/t4_main.c Tue Jun 4 02:25:25 2013 (r251358)
@@ -6573,9 +6573,15 @@ get_filter_hits(struct adapter *sc, uint
memwin_info(sc, 0, &mw_base, NULL);
off = position_memwin(sc, 0,
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
More information about the svn-src-all
mailing list