Page MenuHomeFreeBSD

D27446.diff
No OneTemporary

D27446.diff

Index: head/sys/dev/nvme/nvme_qpair.c
===================================================================
--- head/sys/dev/nvme/nvme_qpair.c
+++ head/sys/dev/nvme/nvme_qpair.c
@@ -547,6 +547,8 @@
if (!qpair->is_enabled)
return (false);
+ bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map,
+ BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
/*
* A panic can stop the CPU this routine is running on at any point. If
* we're called during a panic, complete the sq_head wrap protocol for
@@ -580,8 +582,6 @@
}
}
- bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map,
- BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
while (1) {
cpl = qpair->cpl[qpair->cq_head];
@@ -722,7 +722,7 @@
bus_dma_tag_set_domain(qpair->dma_tag, qpair->domain);
if (bus_dmamem_alloc(qpair->dma_tag, (void **)&queuemem,
- BUS_DMA_NOWAIT, &qpair->queuemem_map)) {
+ BUS_DMA_COHERENT | BUS_DMA_NOWAIT, &qpair->queuemem_map)) {
nvme_printf(ctrlr, "failed to alloc qpair memory\n");
goto out;
}
@@ -982,7 +982,7 @@
bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map,
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
-#ifndef __powerpc__
+#if !defined( __powerpc__) && !defined( __aarch64__) && !defined( __arm__)
/*
* powerpc's bus_dmamap_sync() already includes a heavyweight sync, but
* no other archs do.

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 7:40 AM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14506991
Default Alt Text
D27446.diff (1 KB)

Event Timeline