Module Name:    src
Committed By:   rin
Date:           Mon Aug 15 11:22:45 UTC 2022

Modified Files:
        src/sys/arch/mac68k/obio: esp.c

Log Message:
For avdma, bus_dmamap_create(9) with nsegments = 1, as PSC supports
only one physically contiguous segment in a single DMA transaction.

Slightly improves performance.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/mac68k/obio/esp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mac68k/obio/esp.c
diff -u src/sys/arch/mac68k/obio/esp.c:1.61 src/sys/arch/mac68k/obio/esp.c:1.62
--- src/sys/arch/mac68k/obio/esp.c:1.61	Mon Aug 15 11:18:12 2022
+++ src/sys/arch/mac68k/obio/esp.c	Mon Aug 15 11:22:45 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: esp.c,v 1.61 2022/08/15 11:18:12 rin Exp $	*/
+/*	$NetBSD: esp.c,v 1.62 2022/08/15 11:22:45 rin Exp $	*/
 
 /*
  * Copyright (c) 1997 Jason R. Thorpe.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.61 2022/08/15 11:18:12 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp.c,v 1.62 2022/08/15 11:22:45 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -357,9 +357,9 @@ dafb_dreq:	bst = oa->oa_tag;
 		esc->sc_pio = 0;
 		esc->sc_dmat = oa->oa_dmat;
 
-		if (bus_dmamap_create(esc->sc_dmat, sc->sc_maxxfer,
-		    sc->sc_maxxfer / NBPG + 1, sc->sc_maxxfer, 0,
-		    BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, &esc->sc_dmap)) {
+		if (bus_dmamap_create(esc->sc_dmat, sc->sc_maxxfer, 1,
+		    sc->sc_maxxfer, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW,
+		    &esc->sc_dmap)) {
 			printf("failed to create DMA map.\n");
 			return;
 		}

Reply via email to