Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/arch/mac68k/dev Pull up revs 1.69 and 1.70 from sco...



details:   https://anonhg.NetBSD.org/src/rev/2b9b3a4cc54d
branches:  netbsd-1-5
changeset: 489457:2b9b3a4cc54d
user:      scottr <scottr%NetBSD.org@localhost>
date:      Thu Sep 14 06:35:16 2000 +0000

description:
Pull up revs 1.69 and 1.70 from scottr:
  The last change causes garbage data to be sent.  Revert and
  implement a different solution.

diffstat:

 sys/arch/mac68k/dev/if_ae.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (52 lines):

diff -r 4caad7d33419 -r 2b9b3a4cc54d sys/arch/mac68k/dev/if_ae.c
--- a/sys/arch/mac68k/dev/if_ae.c       Wed Sep 13 19:04:14 2000 +0000
+++ b/sys/arch/mac68k/dev/if_ae.c       Thu Sep 14 06:35:16 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ae.c,v 1.67.26.1 2000/08/06 02:08:01 briggs Exp $   */
+/*     $NetBSD: if_ae.c,v 1.67.26.2 2000/09/14 06:35:16 scottr Exp $   */
 
 /*
  * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -113,12 +113,9 @@
        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) {
@@ -130,7 +127,7 @@
                        if (wantbyte) {
                                savebyte[1] = *data;
                                bus_space_write_region_2(sc->sc_buft,
-                                   sc->sc_bufh, buf, pshort, 1);
+                                   sc->sc_bufh, buf, (u_int16_t *)savebyte, 1);
                                buf += 2;
                                data++;
                                len--;
@@ -138,8 +135,9 @@
                        }
                        /* Output contiguous words. */
                        if (len > 1) {
-                               bus_space_write_region_2(sc->sc_buft,
-                                   sc->sc_bufh, buf, pshort, len >> 1);
+                               bus_space_write_region_2(
+                                   sc->sc_buft, sc->sc_bufh,
+                                   buf, (u_int16_t *)data, len >> 1);
                                buf += len & ~1;
                                data += len & ~1;
                                len &= 1;
@@ -155,7 +153,7 @@
        if (wantbyte) {
                savebyte[1] = 0;
                bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
-                   buf, pshort, 1);
+                   buf, (u_int16_t *)savebyte, 1);
        }
        return (totlen);
 }



Home | Main Index | Thread Index | Old Index