mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 22:33:39 +00:00
- Remember to set the 'extsts enable' bit in the CFG register to enable the
use of the extsts field in DMA descriptors. We need this to tell the chip to calculate TCP/IP checksums in hardware on a per-packet basis. - Fix the unions in DMA descriptor structures. Breakage on alpha led me to realize I'd done it wrong the first time.
This commit is contained in:
parent
dafc44644b
commit
23d3a203ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77842
|
@ -1767,10 +1767,12 @@ static void nge_init(xsc)
|
|||
|
||||
/*
|
||||
* Enable the delivery of PHY interrupts based on
|
||||
* link/speed/duplex status changes.
|
||||
* link/speed/duplex status changes. Also enable the
|
||||
* extsts field in the DMA descriptors (needed for
|
||||
* TCP/IP checksum offload on transmit).
|
||||
*/
|
||||
NGE_SETBIT(sc, NGE_CFG, NGE_CFG_PHYINTR_SPD|NGE_CFG_MODE_1000|
|
||||
NGE_CFG_PHYINTR_LNK|NGE_CFG_PHYINTR_DUP);
|
||||
NGE_CFG_PHYINTR_LNK|NGE_CFG_PHYINTR_DUP|NGE_CFG_EXTSTS_ENB);
|
||||
|
||||
/*
|
||||
* Enable interrupts.
|
||||
|
|
|
@ -258,14 +258,6 @@
|
|||
#define NGE_TXDMA_256BYTES 0x00600000
|
||||
#define NGE_TXDMA_512BYTES 0x00700000
|
||||
|
||||
#define NGE_TXCFG_100 \
|
||||
(NGE_TXDMA_64BYTES|NGE_TXCFG_AUTOPAD|\
|
||||
NGE_TXCFG_FILL(64)|NGE_TXCFG_DRAIN(1536))
|
||||
|
||||
#define NGE_TXCFG_10 \
|
||||
(NGE_TXDMA_32BYTES|NGE_TXCFG_AUTOPAD|\
|
||||
NGE_TXCFG_FILL(64)|NGE_TXCFG_DRAIN(1536))
|
||||
|
||||
#define NGE_TXCFG \
|
||||
(NGE_TXDMA_512BYTES|NGE_TXCFG_AUTOPAD|\
|
||||
NGE_TXCFG_FILL(64)|NGE_TXCFG_DRAIN(6400))
|
||||
|
@ -486,9 +478,12 @@ struct nge_desc_64 {
|
|||
/* Driver software section */
|
||||
union {
|
||||
struct mbuf *nge_mbuf;
|
||||
u_int64_t nge_dummy;
|
||||
} nge_mb_u;
|
||||
union {
|
||||
struct nge_desc_64 *nge_nextdesc;
|
||||
u_int64_t nge_dummy[2];
|
||||
} nge_u;
|
||||
u_int64_t nge_dummy;
|
||||
} nge_nd_u;
|
||||
};
|
||||
|
||||
struct nge_desc_32 {
|
||||
|
@ -503,14 +498,17 @@ struct nge_desc_32 {
|
|||
/* Driver software section */
|
||||
union {
|
||||
struct mbuf *nge_mbuf;
|
||||
u_int64_t nge_dummy;
|
||||
} nge_mb_u;
|
||||
union {
|
||||
struct nge_desc_32 *nge_nextdesc;
|
||||
u_int64_t nge_dummy[2];
|
||||
} nge_u;
|
||||
u_int64_t nge_dummy;
|
||||
} nge_nd_u;
|
||||
};
|
||||
|
||||
#define nge_desc nge_desc_32
|
||||
#define nge_mbuf nge_u.nge_mbuf
|
||||
#define nge_nextdesc nge_u.nge_nextdesc
|
||||
#define nge_mbuf nge_mb_u.nge_mbuf
|
||||
#define nge_nextdesc nge_nd_u.nge_nextdesc
|
||||
|
||||
#define NGE_CMDSTS_BUFLEN 0x0000FFFF
|
||||
#define NGE_CMDSTS_PKT_OK 0x08000000
|
||||
|
|
Loading…
Reference in a new issue