Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Change NE2000_USE_WORD to take pointer to softc r...



details:   https://anonhg.NetBSD.org/src/rev/46f7702db7a0
branches:  trunk
changeset: 476764:46f7702db7a0
user:      enami <enami%NetBSD.org@localhost>
date:      Mon Sep 27 05:25:44 1999 +0000

description:
Change NE2000_USE_WORD to take pointer to softc rather than type.

diffstat:

 sys/dev/ic/ne2000.c    |  8 ++++----
 sys/dev/ic/ne2000var.h |  4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 0ee2fe692d20 -r 46f7702db7a0 sys/dev/ic/ne2000.c
--- a/sys/dev/ic/ne2000.c       Mon Sep 27 05:06:10 1999 +0000
+++ b/sys/dev/ic/ne2000.c       Mon Sep 27 05:25:44 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ne2000.c,v 1.21 1999/09/27 04:52:19 enami Exp $        */
+/*     $NetBSD: ne2000.c,v 1.22 1999/09/27 05:25:44 enami Exp $        */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
                }
        }
 
-       useword = NE2000_USE_WORD(nsc->sc_type);
+       useword = NE2000_USE_WORD(nsc);
 
        dsc->cr_proto = ED_CR_RD2;
 
@@ -574,7 +574,7 @@
        bus_space_tag_t asict = nsc->sc_asict;
        bus_space_handle_t asich = nsc->sc_asich;
        u_short tmp_amount;
-       int useword = NE2000_USE_WORD(nsc->sc_type);
+       int useword = NE2000_USE_WORD(nsc);
 
        /* Does copy wrap to lower addr in ring buffer? */
        if (src + amount > sc->mem_end) {
@@ -605,7 +605,7 @@
 
        ne2000_readmem(sc->sc_regt, sc->sc_regh, nsc->sc_asict, nsc->sc_asich,
            buf, (u_int8_t *)hdr, sizeof(struct dp8390_ring),
-           NE2000_USE_WORD(nsc->sc_type));
+           NE2000_USE_WORD(nsc));
 #if BYTE_ORDER == BIG_ENDIAN
        hdr->count = bswap16(hdr->count);
 #endif
diff -r 0ee2fe692d20 -r 46f7702db7a0 sys/dev/ic/ne2000var.h
--- a/sys/dev/ic/ne2000var.h    Mon Sep 27 05:06:10 1999 +0000
+++ b/sys/dev/ic/ne2000var.h    Mon Sep 27 05:25:44 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ne2000var.h,v 1.4 1999/09/27 04:14:06 enami Exp $      */
+/*     $NetBSD: ne2000var.h,v 1.5 1999/09/27 05:25:44 enami Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
 #define        NE2000_TYPE_NE1000      1
 #define        NE2000_TYPE_NE2000      2
 
-#define        NE2000_USE_WORD(type)   ((type) == NE2000_TYPE_NE2000)
+#define        NE2000_USE_WORD(sc)     (((sc)->sc_type) == NE2000_TYPE_NE2000)
 
 void   ne2000_attach __P((struct ne2000_softc *, u_int8_t *,
            int *, int, int));



Home | Main Index | Thread Index | Old Index