summaryrefslogtreecommitdiffstats
path: root/sys/mips/rmi
diff options
context:
space:
mode:
authorjchandra <jchandra@FreeBSD.org>2010-09-21 07:58:47 +0000
committerjchandra <jchandra@FreeBSD.org>2010-09-21 07:58:47 +0000
commit80e73ffdf86817cef7c332ba91e25d1da39c6f19 (patch)
tree5e8fb5280a90a91d9acb2fd7ea4319e68551adce /sys/mips/rmi
parentd5c71e163fe6006befcb0b43110ef2c0157f00ac (diff)
downloadFreeBSD-src-80e73ffdf86817cef7c332ba91e25d1da39c6f19.zip
FreeBSD-src-80e73ffdf86817cef7c332ba91e25d1da39c6f19.tar.gz
n32 fixes for nlge.
Use correct define (__mips_n64) for n64 compilation and use correct parameter type for xlr_paddr_lw() in n32.
Diffstat (limited to 'sys/mips/rmi')
-rw-r--r--sys/mips/rmi/dev/nlge/if_nlge.c6
-rw-r--r--sys/mips/rmi/rmi_mips_exts.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/mips/rmi/dev/nlge/if_nlge.c b/sys/mips/rmi/dev/nlge/if_nlge.c
index c2730d4..9911890 100644
--- a/sys/mips/rmi/dev/nlge/if_nlge.c
+++ b/sys/mips/rmi/dev/nlge/if_nlge.c
@@ -659,7 +659,7 @@ nlge_msgring_handler(int bucket, int size, int code, int stid,
if (is_p2p) {
release_tx_desc(phys_addr);
} else {
-#ifdef __mips64
+#ifdef __mips_n64
m = (struct mbuf *)(uintptr_t)xlr_paddr_ld(phys_addr);
m->m_nextpkt = NULL;
#else
@@ -1912,7 +1912,7 @@ prepare_fmn_message(struct nlge_softc *sc, struct msgrng_msg *fmn_msg,
if (msg_sz == (FMN_SZ - 1)) {
p2p = uma_zalloc(nl_tx_desc_zone, M_NOWAIT);
if (p2p == NULL) {
- return 2;
+ return (2);
}
/*
* Save the virtual address in the descriptor,
@@ -1948,7 +1948,7 @@ prepare_fmn_message(struct nlge_softc *sc, struct msgrng_msg *fmn_msg,
/* set eop in most-recent p2d */
cur_p2d[-1] |= (1ULL << 63);
-#ifdef __mips64
+#ifdef __mips_n64
/*
* On n64, we cannot store our mbuf pointer(64 bit) in the freeback
* message (40bit available), so we put the mbuf in m_nextpkt and
diff --git a/sys/mips/rmi/rmi_mips_exts.h b/sys/mips/rmi/rmi_mips_exts.h
index 9b13949..72a38ce 100644
--- a/sys/mips/rmi/rmi_mips_exts.h
+++ b/sys/mips/rmi/rmi_mips_exts.h
@@ -436,7 +436,7 @@ xlr_paddr_ld(uint64_t paddr)
#elif defined(__mips_n32)
static __inline uint32_t
-xlr_paddr_lw(uint32_t paddr)
+xlr_paddr_lw(uint64_t paddr)
{
uint32_t val;
OpenPOWER on IntegriCloud