svn commit: r191923 - head/sys/dev/bce
David Christensen
davidch at FreeBSD.org
Fri May 8 22:20:46 UTC 2009
Author: davidch
Date: Fri May 8 22:20:45 2009
New Revision: 191923
URL: http://svn.freebsd.org/changeset/base/191923
Log:
- Fixed incorrect packet length problem caused be earlier change to
support ZERO_COPY_SOCKETS.
- Created #define for context initialization retry count.
MFC after: 1 week
Modified:
head/sys/dev/bce/if_bce.c
head/sys/dev/bce/if_bcereg.h
Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c Fri May 8 20:48:06 2009 (r191922)
+++ head/sys/dev/bce/if_bce.c Fri May 8 22:20:45 2009 (r191923)
@@ -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: head/sys/dev/bce/if_bcereg.h
==============================================================================
--- head/sys/dev/bce/if_bcereg.h Fri May 8 20:48:06 2009 (r191922)
+++ head/sys/dev/bce/if_bcereg.h Fri May 8 22:20:45 2009 (r191923)
@@ -6232,6 +6232,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)
More information about the svn-src-head
mailing list