aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/tokenring/3c359.h
diff options
context:
space:
mode:
authorAl Viro2007-12-22 19:44:10 +0000
committerJeff Garzik2007-12-22 23:16:42 -0500
commit9914cad54c79d0b89b1f066c0894f00e1344131c (patch)
tree75def1828eef4d5ac4337bda3e15aab12dbd0036 /drivers/net/tokenring/3c359.h
parentcc154ac64aa8d3396b187f64cef01ce67f433324 (diff)
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: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tokenring/3c359.h')
-rw-r--r--drivers/net/tokenring/3c359.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/tokenring/3c359.h b/drivers/net/tokenring/3c359.h
index 05c860368852..b880cba0f6fd 100644
--- a/drivers/net/tokenring/3c359.h
+++ b/drivers/net/tokenring/3c359.h
@@ -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 {