diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-12-17 01:48:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:10 -0500 |
commit | 439104b3a39b2f576daa229d783eb2cefac8b7df (patch) | |
tree | 176bbf470b922bd6b0057006cd7e351eb6b972e8 /drivers/net/sungem.c | |
parent | f3ec33e587df02e25963755989cc473e3f07bf0d (diff) |
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.c | 8 |
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) | |||
758 | { | 758 | { |
759 | int entry, drops, work_done = 0; | 759 | int entry, drops, work_done = 0; |
760 | u32 done; | 760 | u32 done; |
761 | __sum16 csum; | ||
761 | 762 | ||
762 | if (netif_msg_rx_status(gp)) | 763 | if (netif_msg_rx_status(gp)) |
763 | printk(KERN_DEBUG "%s: rx interrupt, done: %d, rx_new: %d\n", | 764 | 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) | |||
769 | for (;;) { | 770 | for (;;) { |
770 | struct gem_rxd *rxd = &gp->init_block->rxd[entry]; | 771 | struct gem_rxd *rxd = &gp->init_block->rxd[entry]; |
771 | struct sk_buff *skb; | 772 | struct sk_buff *skb; |
772 | u64 status = cpu_to_le64(rxd->status_word); | 773 | u64 status = le64_to_cpu(rxd->status_word); |
773 | dma_addr_t dma_addr; | 774 | dma_addr_t dma_addr; |
774 | int len; | 775 | int len; |
775 | 776 | ||
@@ -811,7 +812,7 @@ static int gem_rx(struct gem *gp, int work_to_do) | |||
811 | goto next; | 812 | goto next; |
812 | } | 813 | } |
813 | 814 | ||
814 | dma_addr = cpu_to_le64(rxd->buffer); | 815 | dma_addr = le64_to_cpu(rxd->buffer); |
815 | if (len > RX_COPY_THRESHOLD) { | 816 | if (len > RX_COPY_THRESHOLD) { |
816 | struct sk_buff *new_skb; | 817 | struct sk_buff *new_skb; |
817 | 818 | ||
@@ -853,7 +854,8 @@ static int gem_rx(struct gem *gp, int work_to_do) | |||
853 | skb = copy_skb; | 854 | skb = copy_skb; |
854 | } | 855 | } |
855 | 856 | ||
856 | skb->csum = ntohs((status & RXDCTRL_TCPCSUM) ^ 0xffff); | 857 | csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff); |
858 | skb->csum = csum_unfold(csum); | ||
857 | skb->ip_summed = CHECKSUM_COMPLETE; | 859 | skb->ip_summed = CHECKSUM_COMPLETE; |
858 | skb->protocol = eth_type_trans(skb, gp->dev); | 860 | skb->protocol = eth_type_trans(skb, gp->dev); |
859 | 861 | ||