svn commit: r209818 - head/sys/dev/sge
Pyun YongHyeon
yongari at FreeBSD.org
Thu Jul 8 18:22:51 UTC 2010
Author: yongari
Date: Thu Jul 8 18:22:49 2010
New Revision: 209818
URL: http://svn.freebsd.org/changeset/base/209818
Log:
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:
head/sys/dev/sge/if_sge.c
head/sys/dev/sge/if_sgereg.h
Modified: head/sys/dev/sge/if_sge.c
==============================================================================
--- head/sys/dev/sge/if_sge.c Thu Jul 8 18:15:06 2010 (r209817)
+++ head/sys/dev/sge/if_sge.c Thu Jul 8 18:22:49 2010 (r209818)
@@ -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: head/sys/dev/sge/if_sgereg.h
==============================================================================
--- head/sys/dev/sge/if_sgereg.h Thu Jul 8 18:15:06 2010 (r209817)
+++ head/sys/dev/sge/if_sgereg.h Thu Jul 8 18:22:49 2010 (r209818)
@@ -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-all
mailing list