Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k/dev Make bus_space_write_region_2 usage matc...
details: https://anonhg.NetBSD.org/src/rev/4a2894c58a61
branches: trunk
changeset: 495530:4a2894c58a61
user: briggs <briggs%NetBSD.org@localhost>
date: Sun Jul 30 21:41:59 2000 +0000
description:
Make bus_space_write_region_2 usage match prototype.
diffstat:
sys/arch/mac68k/dev/if_ae.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r e0c45a56b1eb -r 4a2894c58a61 sys/arch/mac68k/dev/if_ae.c
--- a/sys/arch/mac68k/dev/if_ae.c Sun Jul 30 21:40:49 2000 +0000
+++ b/sys/arch/mac68k/dev/if_ae.c Sun Jul 30 21:41:59 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ae.c,v 1.67 1998/01/12 19:22:07 thorpej Exp $ */
+/* $NetBSD: if_ae.c,v 1.68 2000/07/30 21:41:59 briggs Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -113,9 +113,12 @@
int buf;
{
u_char *data, savebyte[2];
+ u_int16_t *pshort;
int len, wantbyte;
u_short totlen = 0;
+ pshort = (u_int16_t *) &savebyte[0];
+
wantbyte = 0;
for (; m ; m = m->m_next) {
@@ -127,7 +130,7 @@
if (wantbyte) {
savebyte[1] = *data;
bus_space_write_region_2(sc->sc_buft,
- sc->sc_bufh, buf, savebyte, 1);
+ sc->sc_bufh, buf, pshort, 1);
buf += 2;
data++;
len--;
@@ -136,7 +139,7 @@
/* Output contiguous words. */
if (len > 1) {
bus_space_write_region_2(sc->sc_buft,
- sc->sc_bufh, buf, data, len >> 1);
+ sc->sc_bufh, buf, pshort, len >> 1);
buf += len & ~1;
data += len & ~1;
len &= 1;
@@ -152,7 +155,7 @@
if (wantbyte) {
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
- buf, savebyte, 1);
+ buf, pshort, 1);
}
return (totlen);
}
Home |
Main Index |
Thread Index |
Old Index