Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Perform a BUS_DMASYNC_POSTREAD on the bge_status...
details: https://anonhg.NetBSD.org/src/rev/e0b2f80a6aa4
branches: trunk
changeset: 368290:e0b2f80a6aa4
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jul 03 13:21:28 2022 +0000
description:
Perform a BUS_DMASYNC_POSTREAD on the bge_status_block before reading from
it as required by bus_dma(9).
diffstat:
sys/dev/pci/if_bge.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r f9dea772241c -r e0b2f80a6aa4 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Sun Jul 03 11:30:48 2022 +0000
+++ b/sys/dev/pci/if_bge.c Sun Jul 03 13:21:28 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.362 2022/07/02 08:39:48 skrll Exp $ */
+/* $NetBSD: if_bge.c,v 1.363 2022/07/03 13:21:28 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.362 2022/07/02 08:39:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.363 2022/07/03 13:21:28 skrll Exp $");
#include <sys/param.h>
@@ -4392,6 +4392,11 @@
bus_size_t tlen;
int tosync;
+ bus_dmamap_sync(sc->bge_dmatag, sc->bge_ring_map,
+ offsetof(struct bge_ring_data, bge_status_block),
+ sizeof (struct bge_status_block),
+ BUS_DMASYNC_POSTREAD);
+
rx_cons = sc->bge_rx_saved_considx;
rx_prod = sc->bge_rdata->bge_status_block.bge_idx[0].bge_rx_prod_idx;
@@ -4399,11 +4404,6 @@
if (rx_cons == rx_prod)
return;
- bus_dmamap_sync(sc->bge_dmatag, sc->bge_ring_map,
- offsetof(struct bge_ring_data, bge_status_block),
- sizeof (struct bge_status_block),
- BUS_DMASYNC_POSTREAD);
-
offset = offsetof(struct bge_ring_data, bge_rx_return_ring);
tosync = rx_prod - rx_cons;
Home |
Main Index |
Thread Index |
Old Index