diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 19:57:40 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-21 19:57:40 +0000 |
| commit | d9c9c81c083a76a65c6cacf8fcbc0511e2ffa489 (patch) | |
| tree | cd4dfa8859a5f57124d315ff395b524d7587e1ea /sys/dev/hatm | |
| parent | 5977d3e898348ce714243a4189cee906151aa522 (diff) | |
Notes
Diffstat (limited to 'sys/dev/hatm')
| -rw-r--r-- | sys/dev/hatm/if_hatm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c index d1dd6b1dad28..c34ee0e91075 100644 --- a/sys/dev/hatm/if_hatm.c +++ b/sys/dev/hatm/if_hatm.c @@ -788,16 +788,14 @@ hatm_init_cm(struct hatm_softc *sc) rsra = 0; mlbm = ((rsra + IFP2IFATM(sc->ifp)->mib.max_vccs * 8) + 0x7ff) & ~0x7ff; rabr = ((mlbm + numbuffs * 2) + 0x7ff) & ~0x7ff; - sc->rsrb = ((rabr + 2048) + (2 * IFP2IFATM(sc->ifp)->mib.max_vccs - 1)) & - ~(2 * IFP2IFATM(sc->ifp)->mib.max_vccs - 1); + sc->rsrb = roundup2(rabr + 2048, 2 * IFP2IFATM(sc->ifp)->mib.max_vccs); tsra = 0; sc->tsrb = tsra + IFP2IFATM(sc->ifp)->mib.max_vccs * 8; sc->tsrc = sc->tsrb + IFP2IFATM(sc->ifp)->mib.max_vccs * 4; sc->tsrd = sc->tsrc + IFP2IFATM(sc->ifp)->mib.max_vccs * 2; tabr = sc->tsrd + IFP2IFATM(sc->ifp)->mib.max_vccs * 1; - mtpd = ((tabr + 1024) + (16 * IFP2IFATM(sc->ifp)->mib.max_vccs - 1)) & - ~(16 * IFP2IFATM(sc->ifp)->mib.max_vccs - 1); + mtpd = roundup2(tabr + 1024, 16 * IFP2IFATM(sc->ifp)->mib.max_vccs); DBG(sc, ATTACH, ("rsra=%x mlbm=%x rabr=%x rsrb=%x", rsra, mlbm, rabr, sc->rsrb)); |
