diff options
author | scottl <scottl@FreeBSD.org> | 2003-08-11 09:09:10 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-08-11 09:09:10 +0000 |
commit | 9b42b788c1227c6247fa3148c1d02688e7642f04 (patch) | |
tree | 4b100088274f38e8f26010207ecb3e27e2890c00 /sys/dev/amd | |
parent | e6ffc57441a25e3a8cab5d8757dd6c94416ae90f (diff) | |
download | FreeBSD-src-9b42b788c1227c6247fa3148c1d02688e7642f04.zip FreeBSD-src-9b42b788c1227c6247fa3148c1d02688e7642f04.tar.gz |
bus_dmamap_create() is no longer optional for non-static dma mappings. Thanks
to ru@ for testing this.
Diffstat (limited to 'sys/dev/amd')
-rw-r--r-- | sys/dev/amd/amd.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/amd/amd.c b/sys/dev/amd/amd.c index 26677e4..dd025a1 100644 --- a/sys/dev/amd/amd.c +++ b/sys/dev/amd/amd.c @@ -2115,12 +2115,26 @@ amd_linkSRB(struct amd_softc *amd) { u_int16_t count, i; struct amd_srb *psrb; + int error; count = amd->SRBCount; for (i = 0; i < count; i++) { psrb = (struct amd_srb *)&amd->SRB_array[i]; psrb->TagNumber = i; + + /* + * Create the dmamap. This is no longer optional! + * + * XXX Since there is no detach method in this driver, + * this does not get freed! + */ + if ((error = bus_dmamap_create(amd->buffer_dmat, 0, + &psrb->dmamap)) != 0) { + device_printf(amd->dev, "Error %d creating buffer " + "dmamap!\n", error); + return; + } TAILQ_INSERT_TAIL(&amd->free_srbs, psrb, links); } } |