svn commit: r211361 - stable/8/sys/dev/sge

Pyun YongHyeon yongari at FreeBSD.org
Sun Aug 15 21:56:47 UTC 2010


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


More information about the svn-src-stable-8 mailing list