From owner-svn-src-stable-8@FreeBSD.ORG Sun Aug 15 21:56:47 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBD41065672; Sun, 15 Aug 2010 21:56:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03C778FC18; Sun, 15 Aug 2010 21:56:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7FLukuA073347; Sun, 15 Aug 2010 21:56:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7FLukdh073344; Sun, 15 Aug 2010 21:56:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201008152156.o7FLukdh073344@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 15 Aug 2010 21:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211361 - stable/8/sys/dev/sge X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 21:56:47 -0000 Author: yongari Date: Sun Aug 15 21:56:45 2010 New Revision: 211361 URL: http://svn.freebsd.org/changeset/base/211361 Log: MFC r209818: Remove enabling RX checksum offloading in RX filter setup. RX checksum is enabled in sge_init_locked(). While I'm here do not set RX checksum bits in RX descriptor initialization. It is controller's job to set these bits. Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Sun Aug 15 21:53:07 2010 (r211360) +++ stable/8/sys/dev/sge/if_sge.c Sun Aug 15 21:56:45 2010 (r211361) @@ -480,7 +480,7 @@ sge_rxfilter(struct sge_softc *sc) } if_maddr_runlock(ifp); } - CSR_WRITE_2(sc, RxMacControl, rxfilt | 0x02); + CSR_WRITE_2(sc, RxMacControl, rxfilt); CSR_WRITE_4(sc, RxHashTable, hashes[0]); CSR_WRITE_4(sc, RxHashTable2, hashes[1]); } @@ -1118,8 +1118,7 @@ sge_newbuf(struct sge_softc *sc, int pro desc->sge_flags = htole32(segs[0].ds_len); if (prod == SGE_RX_RING_CNT - 1) desc->sge_flags |= htole32(RING_END); - desc->sge_cmdsts = htole32(RDC_OWN | RDC_INTR | RDC_IP_CSUM | - RDC_TCP_CSUM | RDC_UDP_CSUM); + desc->sge_cmdsts = htole32(RDC_OWN | RDC_INTR); return (0); } @@ -1133,8 +1132,7 @@ sge_discard_rxbuf(struct sge_softc *sc, desc->sge_flags = htole32(MCLBYTES - SGE_RX_BUF_ALIGN); if (index == SGE_RX_RING_CNT - 1) desc->sge_flags |= htole32(RING_END); - desc->sge_cmdsts = htole32(RDC_OWN | RDC_INTR | RDC_IP_CSUM | - RDC_TCP_CSUM | RDC_UDP_CSUM); + desc->sge_cmdsts = htole32(RDC_OWN | RDC_INTR); } /* @@ -1665,7 +1663,7 @@ sge_init_locked(struct sge_softc *sc) for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, RxMacAddr + i, IF_LLADDR(ifp)[i]); /* Configure RX MAC. */ - rxfilt = RXMAC_STRIP_FCS | RXMAC_PAD_ENB; + rxfilt = RXMAC_STRIP_FCS | RXMAC_PAD_ENB | RXMAC_CSUM_ENB; CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); sge_setvlan(sc); Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Sun Aug 15 21:53:07 2010 (r211360) +++ stable/8/sys/dev/sge/if_sgereg.h Sun Aug 15 21:56:45 2010 (r211361) @@ -140,6 +140,7 @@ #define RXMAC_STRIP_VLAN 0x0020 #define RXMAC_STRIP_FCS 0x0010 #define RXMAC_PAD_ENB 0x0004 +#define RXMAC_CSUM_ENB 0x0002 #define SGE_RX_PAD_BYTES 10