Author: delphij
Date: Wed May 20 21:13:49 2009
New Revision: 192477
URL: http://svn.freebsd.org/changeset/base/192477

Log:
  MFC r191923 (davidch):
  
    - Fixed incorrect packet length problem caused be earlier change to
      support ZERO_COPY_SOCKETS.
    - Created #define for context initialization retry count.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/bce/if_bce.c
  stable/7/sys/dev/bce/if_bcereg.h
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/bce/if_bce.c
==============================================================================
--- stable/7/sys/dev/bce/if_bce.c       Wed May 20 21:07:15 2009        
(r192476)
+++ stable/7/sys/dev/bce/if_bce.c       Wed May 20 21:13:49 2009        
(r192477)
@@ -4204,8 +4204,7 @@ bce_init_ctx(struct bce_softc *sc)
 
        if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) ||
                (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) {
-               /* DRC: Replace this constant value with a #define. */
-               int i, retry_cnt = 10;
+               int i, retry_cnt = CTX_INIT_RETRY_COUNT;
                u32 val;
 
                DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n");
@@ -5895,6 +5894,9 @@ bce_rx_intr(struct bce_softc *sc)
                        /* Set the total packet length. */
                        m0->m_pkthdr.len = m0->m_len = pkt_len;
                }
+#else
+        /* Set the total packet length. */
+               m0->m_pkthdr.len = m0->m_len = pkt_len;
 #endif
 
                /* Remove the trailing Ethernet FCS. */

Modified: stable/7/sys/dev/bce/if_bcereg.h
==============================================================================
--- stable/7/sys/dev/bce/if_bcereg.h    Wed May 20 21:07:15 2009        
(r192476)
+++ stable/7/sys/dev/bce/if_bcereg.h    Wed May 20 21:13:49 2009        
(r192477)
@@ -6229,6 +6229,8 @@ struct l2_fhdr {
 
 #endif /* ZERO_COPY_SOCKETS */
 
+#define CTX_INIT_RETRY_COUNT        10
+
 /* Context size. */
 #define CTX_SHIFT                   7
 #define CTX_SIZE                    (1 << CTX_SHIFT)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to