From owner-svn-src-stable-7@FreeBSD.ORG Wed May 20 21:13:50 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 110971065670; Wed, 20 May 2009 21:13:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D88FA8FC19; Wed, 20 May 2009 21:13:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4KLDnJb043960; Wed, 20 May 2009 21:13:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4KLDnBT043958; Wed, 20 May 2009 21:13:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200905202113.n4KLDnBT043958@svn.freebsd.org> From: Xin LI Date: Wed, 20 May 2009 21:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192477 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/bce dev/cxgb X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2009 21:13:50 -0000 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)