Commit a7bed27d authored by Al Viro's avatar Al Viro Committed by Jeff Garzik

b44 endian annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent f5cd7872
...@@ -721,7 +721,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) ...@@ -721,7 +721,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
struct ring_info *src_map, *dest_map; struct ring_info *src_map, *dest_map;
struct rx_header *rh; struct rx_header *rh;
int dest_idx; int dest_idx;
u32 ctrl; __le32 ctrl;
dest_idx = dest_idx_unmasked & (B44_RX_RING_SIZE - 1); dest_idx = dest_idx_unmasked & (B44_RX_RING_SIZE - 1);
dest_desc = &bp->rx_ring[dest_idx]; dest_desc = &bp->rx_ring[dest_idx];
...@@ -783,7 +783,7 @@ static int b44_rx(struct b44 *bp, int budget) ...@@ -783,7 +783,7 @@ static int b44_rx(struct b44 *bp, int budget)
RX_PKT_BUF_SZ, RX_PKT_BUF_SZ,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
rh = (struct rx_header *) skb->data; rh = (struct rx_header *) skb->data;
len = cpu_to_le16(rh->len); len = le16_to_cpu(rh->len);
if ((len > (RX_PKT_BUF_SZ - bp->rx_offset)) || if ((len > (RX_PKT_BUF_SZ - bp->rx_offset)) ||
(rh->flags & cpu_to_le16(RX_FLAG_ERRORS))) { (rh->flags & cpu_to_le16(RX_FLAG_ERRORS))) {
drop_it: drop_it:
...@@ -799,7 +799,7 @@ static int b44_rx(struct b44 *bp, int budget) ...@@ -799,7 +799,7 @@ static int b44_rx(struct b44 *bp, int budget)
do { do {
udelay(2); udelay(2);
barrier(); barrier();
len = cpu_to_le16(rh->len); len = le16_to_cpu(rh->len);
} while (len == 0 && i++ < 5); } while (len == 0 && i++ < 5);
if (len == 0) if (len == 0)
goto drop_it; goto drop_it;
...@@ -2061,7 +2061,7 @@ static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -2061,7 +2061,7 @@ static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int b44_read_eeprom(struct b44 *bp, u8 *data) static int b44_read_eeprom(struct b44 *bp, u8 *data)
{ {
long i; long i;
u16 *ptr = (u16 *) data; __le16 *ptr = (__le16 *) data;
for (i = 0; i < 128; i += 2) for (i = 0; i < 128; i += 2)
ptr[i / 2] = cpu_to_le16(readw(bp->regs + 4096 + i)); ptr[i / 2] = cpu_to_le16(readw(bp->regs + 4096 + i));
......
...@@ -308,8 +308,8 @@ ...@@ -308,8 +308,8 @@
#define MII_TLEDCTRL_ENABLE 0x0040 #define MII_TLEDCTRL_ENABLE 0x0040
struct dma_desc { struct dma_desc {
u32 ctrl; __le32 ctrl;
u32 addr; __le32 addr;
}; };
/* There are only 12 bits in the DMA engine for descriptor offsetting /* There are only 12 bits in the DMA engine for descriptor offsetting
...@@ -327,9 +327,9 @@ struct dma_desc { ...@@ -327,9 +327,9 @@ struct dma_desc {
#define RX_COPY_THRESHOLD 256 #define RX_COPY_THRESHOLD 256
struct rx_header { struct rx_header {
u16 len; __le16 len;
u16 flags; __le16 flags;
u16 pad[12]; __le16 pad[12];
}; };
#define RX_HEADER_LEN 28 #define RX_HEADER_LEN 28
......
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