svn commit: r205098 - user/jmallett/octeon/sys/mips/cavium/dev/rgmii

Juli Mallett jmallett at FreeBSD.org
Fri Mar 12 21:06:36 UTC 2010


Author: jmallett
Date: Fri Mar 12 21:06:35 2010
New Revision: 205098
URL: http://svn.freebsd.org/changeset/base/205098

Log:
  Use octeon_fpa_alloc_phys in a situation in which we don't need a usable pointer,
  rather than octeon_fpa_alloc.

Modified:
  user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c

Modified: user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c
==============================================================================
--- user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Fri Mar 12 19:58:51 2010	(r205097)
+++ user/jmallett/octeon/sys/mips/cavium/dev/rgmii/octeon_rgmx.c	Fri Mar 12 21:06:35 2010	(r205098)
@@ -1015,10 +1015,9 @@ static u_int octeon_rgmx_pko_xmit_packet
          * 3 words or less are left. We write our 2nd word now and then put in a chain link
          * to new PKO cmd buf.
          */
-        void *pko_cmd_buf = octeon_fpa_alloc(OCTEON_FPA_TX_CMDBUF_POOL);
-        uint64_t phys_cmd_buf;
+        uint64_t phys_cmd_buf = octeon_fpa_alloc_phys(OCTEON_FPA_TX_CMDBUF_POOL);
 
-        if (!pko_cmd_buf) {
+        if (!phys_cmd_buf) {
             /*
              * FPA pool for xmit-buffer-commands is empty.
              */
@@ -1026,7 +1025,6 @@ static u_int octeon_rgmx_pko_xmit_packet
             octeon_spinlock_unlock(&(sc->outq_ptr[queue].lock));
             return (0);
         }
-        phys_cmd_buf = OCTEON_PTR2PHYS(pko_cmd_buf);
 
         xmit_cmd_ptr[1] = pko_pkt_word.word64;
         xmit_cmd_ptr[2] = phys_cmd_buf;


More information about the svn-src-user mailing list