diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-12-11 14:50:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:11 -0500 |
commit | a39fe742e71257aaae1bdddcd453877d91e681ad (patch) | |
tree | 72233a538ae249cd50acb820a668a71388a69496 /drivers/net/e1000e/netdev.c | |
parent | 439104b3a39b2f576daa229d783eb2cefac8b7df (diff) |
e1000e 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/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 9b07a722e52d..0a2cb7960c9e 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -91,7 +91,7 @@ static int e1000_desc_unused(struct e1000_ring *ring) | |||
91 | static void e1000_receive_skb(struct e1000_adapter *adapter, | 91 | static void e1000_receive_skb(struct e1000_adapter *adapter, |
92 | struct net_device *netdev, | 92 | struct net_device *netdev, |
93 | struct sk_buff *skb, | 93 | struct sk_buff *skb, |
94 | u8 status, u16 vlan) | 94 | u8 status, __le16 vlan) |
95 | { | 95 | { |
96 | skb->protocol = eth_type_trans(skb, netdev); | 96 | skb->protocol = eth_type_trans(skb, netdev); |
97 | 97 | ||
@@ -142,8 +142,8 @@ static void e1000_rx_checksum(struct e1000_adapter *adapter, u32 status_err, | |||
142 | /* Hardware complements the payload checksum, so we undo it | 142 | /* Hardware complements the payload checksum, so we undo it |
143 | * and then put the value in host order for further stack use. | 143 | * and then put the value in host order for further stack use. |
144 | */ | 144 | */ |
145 | csum = ntohl(csum ^ 0xFFFF); | 145 | __sum16 sum = (__force __sum16)htons(csum); |
146 | skb->csum = csum; | 146 | skb->csum = csum_unfold(~sum); |
147 | skb->ip_summed = CHECKSUM_COMPLETE; | 147 | skb->ip_summed = CHECKSUM_COMPLETE; |
148 | } | 148 | } |
149 | adapter->hw_csum_good++; | 149 | adapter->hw_csum_good++; |
@@ -248,7 +248,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, | |||
248 | ps_page = &buffer_info->ps_pages[j]; | 248 | ps_page = &buffer_info->ps_pages[j]; |
249 | if (j >= adapter->rx_ps_pages) { | 249 | if (j >= adapter->rx_ps_pages) { |
250 | /* all unused desc entries get hw null ptr */ | 250 | /* all unused desc entries get hw null ptr */ |
251 | rx_desc->read.buffer_addr[j+1] = ~0; | 251 | rx_desc->read.buffer_addr[j+1] = ~cpu_to_le64(0); |
252 | continue; | 252 | continue; |
253 | } | 253 | } |
254 | if (!ps_page->page) { | 254 | if (!ps_page->page) { |
@@ -941,7 +941,7 @@ static irqreturn_t e1000_intr(int irq, void *data) | |||
941 | static int e1000_request_irq(struct e1000_adapter *adapter) | 941 | static int e1000_request_irq(struct e1000_adapter *adapter) |
942 | { | 942 | { |
943 | struct net_device *netdev = adapter->netdev; | 943 | struct net_device *netdev = adapter->netdev; |
944 | void (*handler) = &e1000_intr; | 944 | irq_handler_t handler = e1000_intr; |
945 | int irq_flags = IRQF_SHARED; | 945 | int irq_flags = IRQF_SHARED; |
946 | int err; | 946 | int err; |
947 | 947 | ||
@@ -951,7 +951,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter) | |||
951 | "Unable to allocate MSI interrupt Error: %d\n", err); | 951 | "Unable to allocate MSI interrupt Error: %d\n", err); |
952 | } else { | 952 | } else { |
953 | adapter->flags |= FLAG_MSI_ENABLED; | 953 | adapter->flags |= FLAG_MSI_ENABLED; |
954 | handler = &e1000_intr_msi; | 954 | handler = e1000_intr_msi; |
955 | irq_flags = 0; | 955 | irq_flags = 0; |
956 | } | 956 | } |
957 | 957 | ||