Author: yongari
Date: Sun Aug 15 21:58:05 2010
New Revision: 211362
URL: http://svn.freebsd.org/changeset/base/211362

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/7/sys/dev/sge/if_sge.c
  stable/7/sys/dev/sge/if_sgereg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/sge/if_sge.c
==============================================================================
--- stable/7/sys/dev/sge/if_sge.c       Sun Aug 15 21:56:45 2010        
(r211361)
+++ stable/7/sys/dev/sge/if_sge.c       Sun Aug 15 21:58:05 2010        
(r211362)
@@ -480,7 +480,7 @@ sge_rxfilter(struct sge_softc *sc)
                }
                IF_ADDR_UNLOCK(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/7/sys/dev/sge/if_sgereg.h
==============================================================================
--- stable/7/sys/dev/sge/if_sgereg.h    Sun Aug 15 21:56:45 2010        
(r211361)
+++ stable/7/sys/dev/sge/if_sgereg.h    Sun Aug 15 21:58:05 2010        
(r211362)
@@ -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
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to