Author: jchandra
Date: Tue Sep 21 07:58:47 2010
New Revision: 212957
URL: http://svn.freebsd.org/changeset/base/212957

Log:
  n32 fixes for nlge.
  
  Use correct define (__mips_n64) for n64 compilation and use correct
  parameter type for xlr_paddr_lw() in n32.

Modified:
  head/sys/mips/rmi/dev/nlge/if_nlge.c
  head/sys/mips/rmi/rmi_mips_exts.h

Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c
==============================================================================
--- head/sys/mips/rmi/dev/nlge/if_nlge.c        Tue Sep 21 07:44:40 2010        
(r212956)
+++ head/sys/mips/rmi/dev/nlge/if_nlge.c        Tue Sep 21 07:58:47 2010        
(r212957)
@@ -659,7 +659,7 @@ nlge_msgring_handler(int bucket, int siz
                        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 *s
                        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 *s
        /* 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 

Modified: head/sys/mips/rmi/rmi_mips_exts.h
==============================================================================
--- head/sys/mips/rmi/rmi_mips_exts.h   Tue Sep 21 07:44:40 2010        
(r212956)
+++ head/sys/mips/rmi/rmi_mips_exts.h   Tue Sep 21 07:58:47 2010        
(r212957)
@@ -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;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to