summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-08-09 23:07:21 +0000
committerscottl <scottl@FreeBSD.org>2003-08-09 23:07:21 +0000
commit72c305766ee6ca0ee6300c34784353eb433e2279 (patch)
tree62382dd51728dfa0230c3839029dffeec5f43f22 /sys/dev/mlx
parentc15bca94e03b98395856f1d67894314c38560989 (diff)
downloadFreeBSD-src-72c305766ee6ca0ee6300c34784353eb433e2279.zip
FreeBSD-src-72c305766ee6ca0ee6300c34784353eb433e2279.tar.gz
Don't provide a mutex in the S/G list dma tag since it will never be defered.
Fix some nearby style.
Diffstat (limited to 'sys/dev/mlx')
-rw-r--r--sys/dev/mlx/mlx.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index 5e3ee2b..6a1dd5d 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -242,15 +242,14 @@ mlx_sglist_map(struct mlx_softc *sc)
}
segsize = sizeof(struct mlx_sgentry) * MLX_NSEG * ncmd;
error = bus_dma_tag_create(sc->mlx_parent_dmat, /* parent */
- 1, 0, /* alignment, boundary */
+ 1, 0, /* alignment,boundary */
BUS_SPACE_MAXADDR, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
segsize, 1, /* maxsize, nsegments */
BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */
0, /* flags */
- busdma_lock_mutex, /* lockfunc */
- &Giant, /* lockarg */
+ NULL, NULL, /* lockfunc, lockarg */
&sc->mlx_sg_dmat);
if (error != 0) {
device_printf(sc->mlx_dev, "can't allocate scatter/gather DMA tag\n");
@@ -262,15 +261,18 @@ mlx_sglist_map(struct mlx_softc *sc)
* controller-visible space.
*
* XXX this assumes we can get enough space for all the s/g maps in one
- * contiguous slab. We may need to switch to a more complex arrangement where
- * we allocate in smaller chunks and keep a lookup table from slot to bus address.
+ * contiguous slab. We may need to switch to a more complex arrangement
+ * where we allocate in smaller chunks and keep a lookup table from slot
+ * to bus address.
*/
- error = bus_dmamem_alloc(sc->mlx_sg_dmat, (void **)&sc->mlx_sgtable, BUS_DMA_NOWAIT, &sc->mlx_sg_dmamap);
+ error = bus_dmamem_alloc(sc->mlx_sg_dmat, (void **)&sc->mlx_sgtable,
+ BUS_DMA_NOWAIT, &sc->mlx_sg_dmamap);
if (error) {
device_printf(sc->mlx_dev, "can't allocate s/g table\n");
return(ENOMEM);
}
- bus_dmamap_load(sc->mlx_sg_dmat, sc->mlx_sg_dmamap, sc->mlx_sgtable, segsize, mlx_dma_map_sg, sc, 0);
+ bus_dmamap_load(sc->mlx_sg_dmat, sc->mlx_sg_dmamap, sc->mlx_sgtable,
+ segsize, mlx_dma_map_sg, sc, 0);
return(0);
}
OpenPOWER on IntegriCloud