Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci In virtio_alloc_vq change BUS_DMA_NOWAIT to BUS_...
details: https://anonhg.NetBSD.org/src/rev/2965a1a3f720
branches: trunk
changeset: 1018543:2965a1a3f720
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Feb 07 09:29:53 2021 +0000
description:
In virtio_alloc_vq change BUS_DMA_NOWAIT to BUS_DMA_WAITOK. It's always
called from attach routines.
diffstat:
sys/dev/pci/virtio.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 8a978edeebb7 -r 2965a1a3f720 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c Sun Feb 07 09:26:17 2021 +0000
+++ b/sys/dev/pci/virtio.c Sun Feb 07 09:29:53 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio.c,v 1.48 2021/02/07 09:26:17 skrll Exp $ */
+/* $NetBSD: virtio.c,v 1.49 2021/02/07 09:29:53 skrll Exp $ */
/*
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.48 2021/02/07 09:26:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.49 2021/02/07 09:29:53 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -692,7 +692,7 @@
/* alloc and map the memory */
r = bus_dmamem_alloc(sc->sc_dmat, allocsize, VIRTIO_PAGE_SIZE, 0,
- &vq->vq_segs[0], 1, &rsegs, BUS_DMA_NOWAIT);
+ &vq->vq_segs[0], 1, &rsegs, BUS_DMA_WAITOK);
if (r != 0) {
aprint_error_dev(sc->sc_dev,
"virtqueue %d for %s allocation failed, "
@@ -700,7 +700,7 @@
goto err;
}
r = bus_dmamem_map(sc->sc_dmat, &vq->vq_segs[0], rsegs, allocsize,
- &vq->vq_vaddr, BUS_DMA_NOWAIT);
+ &vq->vq_vaddr, BUS_DMA_WAITOK);
if (r != 0) {
aprint_error_dev(sc->sc_dev,
"virtqueue %d for %s map failed, "
@@ -708,7 +708,7 @@
goto err;
}
r = bus_dmamap_create(sc->sc_dmat, allocsize, 1, allocsize, 0,
- BUS_DMA_NOWAIT, &vq->vq_dmamap);
+ BUS_DMA_WAITOK, &vq->vq_dmamap);
if (r != 0) {
aprint_error_dev(sc->sc_dev,
"virtqueue %d for %s dmamap creation failed, "
@@ -716,7 +716,7 @@
goto err;
}
r = bus_dmamap_load(sc->sc_dmat, vq->vq_dmamap,
- vq->vq_vaddr, allocsize, NULL, BUS_DMA_NOWAIT);
+ vq->vq_vaddr, allocsize, NULL, BUS_DMA_WAITOK);
if (r != 0) {
aprint_error_dev(sc->sc_dev,
"virtqueue %d for %s dmamap load failed, "
Home |
Main Index |
Thread Index |
Old Index