Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/ic pull up 1.5 (approved by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/4bebf24da1e5
branches:  netbsd-1-5
changeset: 488834:4bebf24da1e5
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 31 05:33:51 2000 +0000

description:
pull up 1.5 (approved by thorpej):
>Get PCI HME working.

diffstat:

 sys/dev/ic/hmereg.h |  15 ++++++++-------
 sys/dev/ic/hmevar.h |   4 +++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diffs (48 lines):

diff -r f88207d9125f -r 4bebf24da1e5 sys/dev/ic/hmereg.h
--- a/sys/dev/ic/hmereg.h       Mon Jul 31 05:33:27 2000 +0000
+++ b/sys/dev/ic/hmereg.h       Mon Jul 31 05:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hmereg.h,v 1.4 2000/01/28 15:52:34 pk Exp $    */
+/*     $NetBSD: hmereg.h,v 1.4.4.1 2000/07/31 05:33:51 mrg Exp $       */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -264,13 +264,14 @@
 #define HME_XD_SIZE                    8
 #define HME_XD_FLAGS(base, index)      ((base) + ((index) * HME_XD_SIZE) + 0)
 #define HME_XD_ADDR(base, index)       ((base) + ((index) * HME_XD_SIZE) + 4)
-#define HME_XD_GETFLAGS(b, i)                          \
-       (*((u_int32_t *)HME_XD_FLAGS(b,i)))
-#define HME_XD_SETFLAGS(b, i, f)       do {            \
-       *((u_int32_t *)HME_XD_FLAGS(b,i)) = (f);        \
+#define HME_XD_GETFLAGS(p, b, i)                                       \
+       (p) ? le32toh(*((u_int32_t *)HME_XD_FLAGS(b,i))) :              \
+               (*((u_int32_t *)HME_XD_FLAGS(b,i)))
+#define HME_XD_SETFLAGS(p, b, i, f)    do {                            \
+       *((u_int32_t *)HME_XD_FLAGS(b,i)) = ((p) ? htole32(f) : (f));   \
 } while(0)
-#define HME_XD_SETADDR(b, i, a)        do {                    \
-       *((u_int32_t *)HME_XD_ADDR(b,i)) = (a);         \
+#define HME_XD_SETADDR(p, b, i, a)     do {                            \
+       *((u_int32_t *)HME_XD_ADDR(b,i)) = ((p) ? htole32(a) : (a));    \
 } while(0)
 
 /* Descriptor flag values */
diff -r f88207d9125f -r 4bebf24da1e5 sys/dev/ic/hmevar.h
--- a/sys/dev/ic/hmevar.h       Mon Jul 31 05:33:27 2000 +0000
+++ b/sys/dev/ic/hmevar.h       Mon Jul 31 05:33:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hmevar.h,v 1.4 2000/05/09 22:51:34 pk Exp $    */
+/*     $NetBSD: hmevar.h,v 1.4.4.1 2000/07/31 05:33:51 mrg Exp $       */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -82,6 +82,8 @@
        int             sc_burst;       /* DVMA burst size in effect */
        int             sc_phys[2];     /* MII instance -> PHY map */
 
+       int             sc_pci;         /* XXXXX -- PCI buses are LE. */
+
        /* Ring descriptor */
        struct hme_ring         sc_rb;
 #if notused



Home | Main Index | Thread Index | Old Index