summaryrefslogtreecommitdiffstats
path: root/drivers/net/sungem.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-17 06:48:04 +0000
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:07:10 -0800
commit439104b3a39b2f576daa229d783eb2cefac8b7df (patch)
tree176bbf470b922bd6b0057006cd7e351eb6b972e8 /drivers/net/sungem.c
parentf3ec33e587df02e25963755989cc473e3f07bf0d (diff)
downloadtalos-op-linux-439104b3a39b2f576daa229d783eb2cefac8b7df.tar.gz
talos-op-linux-439104b3a39b2f576daa229d783eb2cefac8b7df.zip
sungem endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r--drivers/net/sungem.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 68872142530b..467d80dc3b33 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -758,6 +758,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
{
int entry, drops, work_done = 0;
u32 done;
+ __sum16 csum;
if (netif_msg_rx_status(gp))
printk(KERN_DEBUG "%s: rx interrupt, done: %d, rx_new: %d\n",
@@ -769,7 +770,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
for (;;) {
struct gem_rxd *rxd = &gp->init_block->rxd[entry];
struct sk_buff *skb;
- u64 status = cpu_to_le64(rxd->status_word);
+ u64 status = le64_to_cpu(rxd->status_word);
dma_addr_t dma_addr;
int len;
@@ -811,7 +812,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
goto next;
}
- dma_addr = cpu_to_le64(rxd->buffer);
+ dma_addr = le64_to_cpu(rxd->buffer);
if (len > RX_COPY_THRESHOLD) {
struct sk_buff *new_skb;
@@ -853,7 +854,8 @@ static int gem_rx(struct gem *gp, int work_to_do)
skb = copy_skb;
}
- skb->csum = ntohs((status & RXDCTRL_TCPCSUM) ^ 0xffff);
+ csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff);
+ skb->csum = csum_unfold(csum);
skb->ip_summed = CHECKSUM_COMPLETE;
skb->protocol = eth_type_trans(skb, gp->dev);
OpenPOWER on IntegriCloud