aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/freescale/fec.h
diff options
context:
space:
mode:
authorJim Baxter <jim_baxter@mentor.com>2013-04-19 04:10:49 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-25 03:58:26 -0400
commit4c09eed9dc422e980fabdb25434ef68e599b704c (patch)
treea00da8b76aed9cc916649eafdaf9504e27038b03 /drivers/net/ethernet/freescale/fec.h
parentcf62cb72d63944f4dcc7376efd84959afc9366cb (diff)
net: fec: Enable imx6 enet checksum acceleration.
Enables hardware generation of IP header and protocol specific checksums for transmitted packets. Enabled hardware discarding of received packets with invalid IP header or protocol specific checksums. The feature is enabled by default but can be enabled/disabled by ethtool. Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Jim Baxter <jim_baxter@mentor.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec.h')
-rw-r--r--drivers/net/ethernet/freescale/fec.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index eb4372962839..d44f65bac1d4 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -52,6 +52,7 @@
52#define FEC_R_FIFO_RSEM 0x194 /* Receive FIFO section empty threshold */ 52#define FEC_R_FIFO_RSEM 0x194 /* Receive FIFO section empty threshold */
53#define FEC_R_FIFO_RAEM 0x198 /* Receive FIFO almost empty threshold */ 53#define FEC_R_FIFO_RAEM 0x198 /* Receive FIFO almost empty threshold */
54#define FEC_R_FIFO_RAFL 0x19c /* Receive FIFO almost full threshold */ 54#define FEC_R_FIFO_RAFL 0x19c /* Receive FIFO almost full threshold */
55#define FEC_RACC 0x1C4 /* Receive Accelerator function */
55#define FEC_MIIGSK_CFGR 0x300 /* MIIGSK Configuration reg */ 56#define FEC_MIIGSK_CFGR 0x300 /* MIIGSK Configuration reg */
56#define FEC_MIIGSK_ENR 0x308 /* MIIGSK Enable reg */ 57#define FEC_MIIGSK_ENR 0x308 /* MIIGSK Enable reg */
57 58
@@ -164,9 +165,11 @@ struct bufdesc_ex {
164#define BD_ENET_TX_CSL ((ushort)0x0001) 165#define BD_ENET_TX_CSL ((ushort)0x0001)
165#define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */ 166#define BD_ENET_TX_STATS ((ushort)0x03ff) /* All status bits */
166 167
167/*enhanced buffer desciptor control/status used by Ethernet transmit*/ 168/*enhanced buffer descriptor control/status used by Ethernet transmit*/
168#define BD_ENET_TX_INT 0x40000000 169#define BD_ENET_TX_INT 0x40000000
169#define BD_ENET_TX_TS 0x20000000 170#define BD_ENET_TX_TS 0x20000000
171#define BD_ENET_TX_PINS 0x10000000
172#define BD_ENET_TX_IINS 0x08000000
170 173
171 174
172/* This device has up to three irqs on some platforms */ 175/* This device has up to three irqs on some platforms */
@@ -190,6 +193,10 @@ struct bufdesc_ex {
190 193
191#define BD_ENET_RX_INT 0x00800000 194#define BD_ENET_RX_INT 0x00800000
192#define BD_ENET_RX_PTP ((ushort)0x0400) 195#define BD_ENET_RX_PTP ((ushort)0x0400)
196#define BD_ENET_RX_ICE 0x00000020
197#define BD_ENET_RX_PCR 0x00000010
198#define FLAG_RX_CSUM_ENABLED (BD_ENET_RX_ICE | BD_ENET_RX_PCR)
199#define FLAG_RX_CSUM_ERROR (BD_ENET_RX_ICE | BD_ENET_RX_PCR)
193 200
194/* The FEC buffer descriptors track the ring buffers. The rx_bd_base and 201/* The FEC buffer descriptors track the ring buffers. The rx_bd_base and
195 * tx_bd_base always point to the base of the buffer descriptors. The 202 * tx_bd_base always point to the base of the buffer descriptors. The
@@ -247,6 +254,7 @@ struct fec_enet_private {
247 int pause_flag; 254 int pause_flag;
248 255
249 struct napi_struct napi; 256 struct napi_struct napi;
257 int csum_flags;
250 258
251 struct ptp_clock *ptp_clock; 259 struct ptp_clock *ptp_clock;
252 struct ptp_clock_info ptp_caps; 260 struct ptp_clock_info ptp_caps;