- 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
This commit is contained in:
David Christensen 2009-05-08 22:20:45 +00:00
parent e5a34e5582
commit 8ef3f835d2
2 changed files with 6 additions and 2 deletions

View File

@ -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. */

View File

@ -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)