summaryrefslogtreecommitdiffstats
path: root/sys/dev/amd/amd.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-08-11 09:09:10 +0000
committerscottl <scottl@FreeBSD.org>2003-08-11 09:09:10 +0000
commit9b42b788c1227c6247fa3148c1d02688e7642f04 (patch)
tree4b100088274f38e8f26010207ecb3e27e2890c00 /sys/dev/amd/amd.c
parente6ffc57441a25e3a8cab5d8757dd6c94416ae90f (diff)
downloadFreeBSD-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/amd.c')
-rw-r--r--sys/dev/amd/amd.c14
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);
}
}
OpenPOWER on IntegriCloud