diff options
author | jhb <jhb@FreeBSD.org> | 2016-12-05 19:15:33 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-12-05 19:15:33 +0000 |
commit | eb3c11b609cc1a1cf6f7081cbcabca20b47e1271 (patch) | |
tree | 945f13755f740c603b0f8d9742e51aee6976955f /sys/dev/cxgbe/tom/t4_tom.c | |
parent | 356fbc072920d7e71c42b310d6bfa2d1a3d36f9f (diff) | |
download | FreeBSD-src-eb3c11b609cc1a1cf6f7081cbcabca20b47e1271.zip FreeBSD-src-eb3c11b609cc1a1cf6f7081cbcabca20b47e1271.tar.gz |
MFC 303688,303750,305166,305167: Centralize and rework page pod handling.
303688:
cxgbe/t4_tom: Read the chip's DDP page sizes and save them in a
per-adapter data structure. This replaces a global array with hardcoded
page sizes.
303750:
cxgbe/t4_tom: The page pod arena allocates from pod address space and
not index space. The minimum valid allocation out of this arena is the
size of a single page pod.
305166:
cxgbe/t4_tom: Add general purpose routines to deal with page pod regions
and allocations within them. Switch to these routines to manage the TOE
DDP region.
305167:
cxgbe/t4_tom: Two new routines to allocate and write page pods for a
buffer in the kernel's address space.
Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/dev/cxgbe/tom/t4_tom.c')
-rw-r--r-- | sys/dev/cxgbe/tom/t4_tom.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 56006d0..04f9bcd 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -930,7 +930,7 @@ free_tom_data(struct adapter *sc, struct tom_data *td) KASSERT(td->lctx_count == 0, ("%s: lctx hash table is not empty.", __func__)); - t4_uninit_ddp(sc, td); + t4_free_ppod_region(&td->pr); destroy_clip_table(sc, td); if (td->listen_mask != 0) @@ -1024,8 +1024,12 @@ t4_tom_activate(struct adapter *sc) if (rc != 0) goto done; - /* DDP page pods and CPL handlers */ - t4_init_ddp(sc, td); + rc = t4_init_ppod_region(&td->pr, &sc->vres.ddp, + t4_read_reg(sc, A_ULP_RX_TDDP_PSZ), "TDDP page pods"); + if (rc != 0) + goto done; + t4_set_reg_field(sc, A_ULP_RX_TDDP_TAGMASK, + V_TDDPTAGMASK(M_TDDPTAGMASK), td->pr.pr_tag_mask); /* CLIP table for IPv6 offload */ init_clip_table(sc, td); |