aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-01-29 15:36:54 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-06 19:03:56 -0500
commita7bed27dc69e3bc9238549a4964ea94ec318362c (patch)
treeec8fc1780794a8b8e4a992727462a03cb437873c
parentf5cd7872768d5856b1b409a33f516e5ac7798f75 (diff)
b44 endian annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/b44.c8
-rw-r--r--drivers/net/b44.h10
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 303a8d94ad4b..5ff7882297d6 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -721,7 +721,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
721 struct ring_info *src_map, *dest_map; 721 struct ring_info *src_map, *dest_map;
722 struct rx_header *rh; 722 struct rx_header *rh;
723 int dest_idx; 723 int dest_idx;
724 u32 ctrl; 724 __le32 ctrl;
725 725
726 dest_idx = dest_idx_unmasked & (B44_RX_RING_SIZE - 1); 726 dest_idx = dest_idx_unmasked & (B44_RX_RING_SIZE - 1);
727 dest_desc = &bp->rx_ring[dest_idx]; 727 dest_desc = &bp->rx_ring[dest_idx];
@@ -783,7 +783,7 @@ static int b44_rx(struct b44 *bp, int budget)
783 RX_PKT_BUF_SZ, 783 RX_PKT_BUF_SZ,
784 PCI_DMA_FROMDEVICE); 784 PCI_DMA_FROMDEVICE);
785 rh = (struct rx_header *) skb->data; 785 rh = (struct rx_header *) skb->data;
786 len = cpu_to_le16(rh->len); 786 len = le16_to_cpu(rh->len);
787 if ((len > (RX_PKT_BUF_SZ - bp->rx_offset)) || 787 if ((len > (RX_PKT_BUF_SZ - bp->rx_offset)) ||
788 (rh->flags & cpu_to_le16(RX_FLAG_ERRORS))) { 788 (rh->flags & cpu_to_le16(RX_FLAG_ERRORS))) {
789 drop_it: 789 drop_it:
@@ -799,7 +799,7 @@ static int b44_rx(struct b44 *bp, int budget)
799 do { 799 do {
800 udelay(2); 800 udelay(2);
801 barrier(); 801 barrier();
802 len = cpu_to_le16(rh->len); 802 len = le16_to_cpu(rh->len);
803 } while (len == 0 && i++ < 5); 803 } while (len == 0 && i++ < 5);
804 if (len == 0) 804 if (len == 0)
805 goto drop_it; 805 goto drop_it;
@@ -2061,7 +2061,7 @@ out:
2061static int b44_read_eeprom(struct b44 *bp, u8 *data) 2061static int b44_read_eeprom(struct b44 *bp, u8 *data)
2062{ 2062{
2063 long i; 2063 long i;
2064 u16 *ptr = (u16 *) data; 2064 __le16 *ptr = (__le16 *) data;
2065 2065
2066 for (i = 0; i < 128; i += 2) 2066 for (i = 0; i < 128; i += 2)
2067 ptr[i / 2] = cpu_to_le16(readw(bp->regs + 4096 + i)); 2067 ptr[i / 2] = cpu_to_le16(readw(bp->regs + 4096 + i));
diff --git a/drivers/net/b44.h b/drivers/net/b44.h
index 4944507fad23..18fc13336628 100644
--- a/drivers/net/b44.h
+++ b/drivers/net/b44.h
@@ -308,8 +308,8 @@
308#define MII_TLEDCTRL_ENABLE 0x0040 308#define MII_TLEDCTRL_ENABLE 0x0040
309 309
310struct dma_desc { 310struct dma_desc {
311 u32 ctrl; 311 __le32 ctrl;
312 u32 addr; 312 __le32 addr;
313}; 313};
314 314
315/* There are only 12 bits in the DMA engine for descriptor offsetting 315/* There are only 12 bits in the DMA engine for descriptor offsetting
@@ -327,9 +327,9 @@ struct dma_desc {
327#define RX_COPY_THRESHOLD 256 327#define RX_COPY_THRESHOLD 256
328 328
329struct rx_header { 329struct rx_header {
330 u16 len; 330 __le16 len;
331 u16 flags; 331 __le16 flags;
332 u16 pad[12]; 332 __le16 pad[12];
333}; 333};
334#define RX_HEADER_LEN 28 334#define RX_HEADER_LEN 28
335 335