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.
This commit is contained in:
Scott Long 2003-08-09 15:16:45 +00:00
parent 67fdc6b784
commit 588920f14e

View File

@ -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);
}