Commit 9914cad5 authored by Al Viro's avatar Al Viro Committed by Jeff Garzik

3c359 endianness annotations and fixes

Same story as with olympic - htons(readw()) when swab16(readw()) is needed,
missing conversions to le32 when dealing with shared descriptors, etc.
Olympic got those fixes in 2.4.0-test2, 3c359 didn't.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent cc154ac6
This diff is collapsed.
......@@ -156,19 +156,19 @@
#define HOSTERRINT (1<<1)
/* Receive descriptor bits */
#define RXOVERRUN (1<<19)
#define RXFC (1<<21)
#define RXAR (1<<22)
#define RXUPDCOMPLETE (1<<23)
#define RXUPDFULL (1<<24)
#define RXUPLASTFRAG (1<<31)
#define RXOVERRUN cpu_to_le32(1<<19)
#define RXFC cpu_to_le32(1<<21)
#define RXAR cpu_to_le32(1<<22)
#define RXUPDCOMPLETE cpu_to_le32(1<<23)
#define RXUPDFULL cpu_to_le32(1<<24)
#define RXUPLASTFRAG cpu_to_le32(1<<31)
/* Transmit descriptor bits */
#define TXDNCOMPLETE (1<<16)
#define TXTXINDICATE (1<<27)
#define TXDPDEMPTY (1<<29)
#define TXDNINDICATE (1<<31)
#define TXDNFRAGLAST (1<<31)
#define TXDNCOMPLETE cpu_to_le32(1<<16)
#define TXTXINDICATE cpu_to_le32(1<<27)
#define TXDPDEMPTY cpu_to_le32(1<<29)
#define TXDNINDICATE cpu_to_le32(1<<31)
#define TXDNFRAGLAST cpu_to_le32(1<<31)
/* Interrupts to Acknowledge */
#define LATCH_ACK 1
......@@ -232,17 +232,17 @@
/* 3c359 data structures */
struct xl_tx_desc {
u32 dnnextptr ;
u32 framestartheader ;
u32 buffer ;
u32 buffer_length ;
__le32 dnnextptr;
__le32 framestartheader;
__le32 buffer;
__le32 buffer_length;
};
struct xl_rx_desc {
u32 upnextptr ;
u32 framestatus ;
u32 upfragaddr ;
u32 upfraglen ;
__le32 upnextptr;
__le32 framestatus;
__le32 upfragaddr;
__le32 upfraglen;
};
struct xl_private {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment