dm9000: add checksum offload support

Add checksum offload support for DM9000A and DM9000B chips.

v2 changes: added a local copy of ip_summed to save IO cycles in dm9000_send_packet
v3 changes: trans_start updating is removed.

Signed-off-by: Yeasah Pell <yeasah@comrex.com>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yeasah Pell
2009-07-06 18:12:33 -07:00
committed by David S. Miller
parent 482d804cb4
commit 5dcc60b718
2 changed files with 108 additions and 17 deletions

View File

@@ -45,6 +45,10 @@
#define DM9000_CHIPR 0x2C
#define DM9000_SMCR 0x2F
#define DM9000_ETXCSR 0x30
#define DM9000_TCCR 0x31
#define DM9000_RCSR 0x32
#define CHIPR_DM9000A 0x19
#define CHIPR_DM9000B 0x1B
@@ -131,7 +135,21 @@
#define GPCR_GEP_CNTL (1<<0)
#define TCCR_IP (1<<0)
#define TCCR_TCP (1<<1)
#define TCCR_UDP (1<<2)
#define RCSR_UDP_BAD (1<<7)
#define RCSR_TCP_BAD (1<<6)
#define RCSR_IP_BAD (1<<5)
#define RCSR_UDP (1<<4)
#define RCSR_TCP (1<<3)
#define RCSR_IP (1<<2)
#define RCSR_CSUM (1<<1)
#define RCSR_DISCARD (1<<0)
#define DM9000_PKT_RDY 0x01 /* Packet ready to receive */
#define DM9000_PKT_ERR 0x02
#define DM9000_PKT_MAX 1536 /* Received packet max size */
/* DM9000A / DM9000B definitions */