diff options
author | scottl <scottl@FreeBSD.org> | 2003-08-09 15:16:45 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-08-09 15:16:45 +0000 |
commit | 4f850b7725addd63b26b2d7534540b0222d36d8e (patch) | |
tree | e213fd37c9f2fbcb841142e5d22845f00b3df50d | |
parent | af63867e649990c1b529ad6283a787e6e7b13e14 (diff) | |
download | FreeBSD-src-4f850b7725addd63b26b2d7534540b0222d36d8e.zip FreeBSD-src-4f850b7725addd63b26b2d7534540b0222d36d8e.tar.gz |
Call bus_dmamap_create() to create the per-SRB buffer maps. Note that none
of the SRB resources are freed when the driver unloads; maybe that will be
tackled another day.
-rw-r--r-- | sys/dev/trm/trm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/trm/trm.c b/sys/dev/trm/trm.c index 385d220..acc33a4 100644 --- a/sys/dev/trm/trm.c +++ b/sys/dev/trm/trm.c @@ -2999,6 +2999,7 @@ trm_initSRB(PACB pACB) { u_int16_t i; PSRB pSRB; + int error; for (i = 0; i < TRM_MAX_SRB_CNT; i++) { pSRB = (PSRB)&pACB->pFreeSRB[i]; @@ -3040,6 +3041,17 @@ trm_initSRB(PACB pACB) pSRB->pNextSRB = NULL; } pSRB->TagNumber = i; + + /* + * Create the dmamap. This is no longer optional! + * + * XXX This is not freed on unload! None of the other + * allocations in this function are either! + */ + if ((error = bus_dmamap_create(pACB->buffer_dmat, 0, + &pSRB->dmamap)) != 0) + return (error); + } return (0); } |