Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic fix a sync range size when number of bus_dma segm...
details: https://anonhg.NetBSD.org/src/rev/78b0fbcb0b13
branches: trunk
changeset: 348421:78b0fbcb0b13
user: nonaka <nonaka%NetBSD.org@localhost>
date: Tue Oct 18 07:48:05 2016 +0000
description:
fix a sync range size when number of bus_dma segment is greater than 2.
diffstat:
sys/dev/ic/nvme.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 9f09adc187dc -r 78b0fbcb0b13 sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Tue Oct 18 07:30:30 2016 +0000
+++ b/sys/dev/ic/nvme.c Tue Oct 18 07:48:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvme.c,v 1.15 2016/10/05 03:46:38 nonaka Exp $ */
+/* $NetBSD: nvme.c,v 1.16 2016/10/18 07:48:05 nonaka Exp $ */
/* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.15 2016/10/05 03:46:38 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.16 2016/10/18 07:48:05 nonaka Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -668,7 +668,7 @@
bus_dmamap_sync(sc->sc_dmat,
NVME_DMA_MAP(q->q_ccb_prpls),
ccb->ccb_prpl_off,
- sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+ sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
BUS_DMASYNC_PREWRITE);
}
@@ -726,7 +726,7 @@
bus_dmamap_sync(sc->sc_dmat,
NVME_DMA_MAP(q->q_ccb_prpls),
ccb->ccb_prpl_off,
- sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+ sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
BUS_DMASYNC_POSTWRITE);
}
@@ -833,7 +833,7 @@
bus_dmamap_sync(sc->sc_dmat,
NVME_DMA_MAP(q->q_ccb_prpls),
ccb->ccb_prpl_off,
- sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+ sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
BUS_DMASYNC_PREWRITE);
htolem64(&sqe->entry.prp[1], ccb->ccb_prpl_dva);
break;
@@ -860,7 +860,7 @@
bus_dmamap_sync(sc->sc_dmat,
NVME_DMA_MAP(q->q_ccb_prpls),
ccb->ccb_prpl_off,
- sizeof(*ccb->ccb_prpl) * dmap->dm_nsegs - 1,
+ sizeof(*ccb->ccb_prpl) * (dmap->dm_nsegs - 1),
BUS_DMASYNC_POSTWRITE);
}
Home |
Main Index |
Thread Index |
Old Index