Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci bge(4): Use BUS_DMA_WAITOK in ring initilization...



details:   https://anonhg.NetBSD.org/src/rev/405145d865a2
branches:  trunk
changeset: 369850:405145d865a2
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Sep 04 08:55:43 2022 +0000

description:
bge(4): Use BUS_DMA_WAITOK in ring initilization now that it's safe

diffstat:

 sys/dev/pci/if_bge.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 25861b6c86ff -r 405145d865a2 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Sun Sep 04 08:50:25 2022 +0000
+++ b/sys/dev/pci/if_bge.c      Sun Sep 04 08:55:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.386 2022/09/04 08:50:25 skrll Exp $       */
+/*     $NetBSD: if_bge.c,v 1.387 2022/09/04 08:55:43 skrll Exp $       */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.386 2022/09/04 08:50:25 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.387 2022/09/04 08:55:43 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -1596,7 +1596,7 @@
 
        for (i = 0; i < BGE_STD_RX_RING_CNT; i++) {
                error = bus_dmamap_create(sc->bge_dmatag, MCLBYTES, 1,
-                   MCLBYTES, 0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW, &dmamap);
+                   MCLBYTES, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, &dmamap);
                if (error)
                        goto uncreate;
 
@@ -1794,7 +1794,7 @@
 
        for (i = 0; i < BGE_TX_RING_CNT; i++) {
                if (bus_dmamap_create(sc->bge_dmatag, BGE_TXDMA_MAX,
-                   BGE_NTXSEG, maxsegsz, 0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW,
+                   BGE_NTXSEG, maxsegsz, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW,
                    &dmamap))
                        return ENOBUFS;
                if (dmamap == NULL)
@@ -1802,7 +1802,7 @@
                if (sc->bge_dma64) {
                        if (bus_dmamap_create(sc->bge_dmatag32, BGE_TXDMA_MAX,
                            BGE_NTXSEG, maxsegsz, 0,
-                           BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW,
+                           BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW,
                            &dmamap32)) {
                                bus_dmamap_destroy(sc->bge_dmatag, dmamap);
                                return ENOBUFS;



Home | Main Index | Thread Index | Old Index