summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-02-15 20:09:00 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-02-15 20:09:00 +0000
commit0cf4221812fc76bcec259a32736ebb27537a0c6d (patch)
tree3ad34487b0a7f85fc75d3538cb5cf83393807f1f /sys/dev/pci
parentdcfdbd9158934aa10840d1cd301889ef92669ea0 (diff)
add support for 64bit rings base addresses.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_nfe.c12
-rw-r--r--sys/dev/pci/if_nfereg.h8
2 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index 9f8ff4fa982..748db93f342 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.38 2006/02/15 19:53:17 damien Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.39 2006/02/15 20:08:59 damien Exp $ */
/*-
* Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -1086,8 +1086,14 @@ nfe_init(struct ifnet *ifp)
nfe_set_macaddr(sc, sc->sc_arpcom.ac_enaddr);
/* tell MAC where rings are in memory */
- NFE_WRITE(sc, NFE_RX_RING_ADDR, sc->rxq.physaddr);
- NFE_WRITE(sc, NFE_TX_RING_ADDR, sc->txq.physaddr);
+#ifdef __LP64__
+ NFE_WRITE(sc, NFE_RX_RING_ADDR_HI, sc->rxq.physaddr >> 32);
+#endif
+ NFE_WRITE(sc, NFE_RX_RING_ADDR_LO, sc->rxq.physaddr & 0xffffffff);
+#ifdef __LP64__
+ NFE_WRITE(sc, NFE_TX_RING_ADDR_HI, sc->txq.physaddr >> 32);
+#endif
+ NFE_WRITE(sc, NFE_TX_RING_ADDR_LO, sc->txq.physaddr & 0xffffffff);
NFE_WRITE(sc, NFE_RING_SIZE,
(NFE_RX_RING_COUNT - 1) << 16 |
diff --git a/sys/dev/pci/if_nfereg.h b/sys/dev/pci/if_nfereg.h
index d3f8f7d10ac..614aa8a4c12 100644
--- a/sys/dev/pci/if_nfereg.h
+++ b/sys/dev/pci/if_nfereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfereg.h,v 1.11 2006/02/15 19:36:46 damien Exp $ */
+/* $OpenBSD: if_nfereg.h,v 1.12 2006/02/15 20:08:59 damien Exp $ */
/*-
* Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org>
@@ -48,8 +48,8 @@
#define NFE_MULTIMASK_HI 0x0b8
#define NFE_MULTIMASK_LO 0x0bc
#define NFE_PHY_IFACE 0x0c0
-#define NFE_TX_RING_ADDR 0x100
-#define NFE_RX_RING_ADDR 0x104
+#define NFE_TX_RING_ADDR_LO 0x100
+#define NFE_RX_RING_ADDR_LO 0x104
#define NFE_RING_SIZE 0x108
#define NFE_TX_UNK 0x10c
#define NFE_LINKSPEED 0x110
@@ -57,6 +57,8 @@
#define NFE_SETUP_R3 0x13C
#define NFE_SETUP_R7 0x140
#define NFE_RXTX_CTL 0x144
+#define NFE_TX_RING_ADDR_HI 0x148
+#define NFE_RX_RING_ADDR_HI 0x14c
#define NFE_PHY_STATUS 0x180
#define NFE_SETUP_R4 0x184
#define NFE_STATUS 0x188