Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.60 (requested by bouyer ...
details: https://anonhg.NetBSD.org/src/rev/0e4f71bd90e7
branches: netbsd-1-6
changeset: 531353:0e4f71bd90e7
user: tron <tron%NetBSD.org@localhost>
date: Wed May 26 14:02:31 2004 +0000
description:
Pull up revision 1.60 (requested by bouyer in ticket #1698):
Use the bus_space_*_stream_* methods to access the chip's registers.
As we turn the chip to big-endian mode on big-endian systems, we should
never byte-swap the data read/written from/to registers. Tested on sparc64.
Finally fix kern/13341 by Jason R. Thorpe (really, the hard work of putting
bus_dmamap_sync() calls at the right places has been done my Jason mid-2001 :)
diffstat:
sys/dev/pci/if_ti.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r e375aff84659 -r 0e4f71bd90e7 sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c Wed May 26 14:02:23 2004 +0000
+++ b/sys/dev/pci/if_ti.c Wed May 26 14:02:31 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.47.4.2 2004/05/26 14:00:59 tron Exp $ */
+/* $NetBSD: if_ti.c,v 1.47.4.3 2004/05/26 14:02:31 tron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.47.4.2 2004/05/26 14:00:59 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.47.4.3 2004/05/26 14:02:31 tron Exp $");
#include "bpfilter.h"
#include "opt_inet.h"
@@ -387,9 +387,16 @@
TI_WINDOW + (segptr & (TI_WINLEN - 1)), 0,
segsize / 4);
} else {
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+ bus_space_write_region_stream_4(sc->ti_btag,
+ sc->ti_bhandle,
+ TI_WINDOW + (segptr & (TI_WINLEN - 1)),
+ (u_int32_t *)ptr, segsize / 4);
+#else
bus_space_write_region_4(sc->ti_btag, sc->ti_bhandle,
TI_WINDOW + (segptr & (TI_WINLEN - 1)),
(u_int32_t *)ptr, segsize / 4);
+#endif
ptr += segsize;
}
segptr += segsize;
Home |
Main Index |
Thread Index |
Old Index