summaryrefslogtreecommitdiffstats
path: root/sys/dev/bce
diff options
context:
space:
mode:
authordavidch <davidch@FreeBSD.org>2009-05-08 22:20:45 +0000
committerdavidch <davidch@FreeBSD.org>2009-05-08 22:20:45 +0000
commit8583a840068803e7fd9e0fc2452605bca6e822d8 (patch)
tree0a29a85ed5669fe0a53b0b5f0392c136b2320892 /sys/dev/bce
parent8dbae36d2bbd3b00694a7d2365e11d1aca92dd6f (diff)
downloadFreeBSD-src-8583a840068803e7fd9e0fc2452605bca6e822d8.zip
FreeBSD-src-8583a840068803e7fd9e0fc2452605bca6e822d8.tar.gz
- 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
Diffstat (limited to 'sys/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c6
-rw-r--r--sys/dev/bce/if_bcereg.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index d39af9b..bd267f7 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -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. */
diff --git a/sys/dev/bce/if_bcereg.h b/sys/dev/bce/if_bcereg.h
index 518b4b9..32456fd 100644
--- a/sys/dev/bce/if_bcereg.h
+++ b/sys/dev/bce/if_bcereg.h
@@ -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)
OpenPOWER on IntegriCloud