mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-21 15:45:02 +00:00
Adjust the descriptor structures a little by making the software parts
be unions with enough padding to make sure they always end up being a multiple of 8 bytes in size, since the 83820/83821 chips require descriptors to be aligned on 64-bit boundaries. I happened to get it right for the 32-bit descriptor/x86 case, but botched everything else. Things should work properle on 32-bit/64-bit platforms now. Note that the 64-bit descriptor format isn't being used currently.
This commit is contained in:
parent
01e281bd12
commit
ddde4ea967
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76638
@ -484,8 +484,11 @@ struct nge_desc_64 {
|
||||
#define nge_ctl nge_cmdsts
|
||||
u_int32_t nge_extsts;
|
||||
/* Driver software section */
|
||||
struct mbuf *nge_mbuf;
|
||||
struct nge_desc_64 *nge_nextdesc;
|
||||
union {
|
||||
struct mbuf *nge_mbuf;
|
||||
struct nge_desc_64 *nge_nextdesc;
|
||||
u_int64_t nge_dummy[2];
|
||||
} nge_u;
|
||||
};
|
||||
|
||||
struct nge_desc_32 {
|
||||
@ -498,11 +501,16 @@ struct nge_desc_32 {
|
||||
#define nge_ctl nge_cmdsts
|
||||
u_int32_t nge_extsts;
|
||||
/* Driver software section */
|
||||
struct mbuf *nge_mbuf;
|
||||
struct nge_desc_32 *nge_nextdesc;
|
||||
union {
|
||||
struct mbuf *nge_mbuf;
|
||||
struct nge_desc_32 *nge_nextdesc;
|
||||
u_int64_t nge_dummy[2];
|
||||
} nge_u;
|
||||
};
|
||||
|
||||
#define nge_desc nge_desc_32
|
||||
#define nge_mbuf nge_u.nge_mbuf
|
||||
#define nge_nextdesc nge_u.nge_nextdesc
|
||||
|
||||
#define NGE_CMDSTS_BUFLEN 0x0000FFFF
|
||||
#define NGE_CMDSTS_PKT_OK 0x08000000
|
||||
|
Loading…
Reference in New Issue
Block a user