aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-11 14:49:39 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:11 -0500
commit3e18826c73735eee5fca92584137824d9a387008 (patch)
tree032178c6c51dcb03459cbdc1ab7b7b7f442d1108 /drivers/net/e1000/e1000_main.c
parenta39fe742e71257aaae1bdddcd453877d91e681ad (diff)
e1000 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/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ade483e6e6d0..d3665bc9bd40 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -272,14 +272,14 @@ module_exit(e1000_exit_module);
272static int e1000_request_irq(struct e1000_adapter *adapter) 272static int e1000_request_irq(struct e1000_adapter *adapter)
273{ 273{
274 struct net_device *netdev = adapter->netdev; 274 struct net_device *netdev = adapter->netdev;
275 void (*handler) = &e1000_intr; 275 irq_handler_t handler = e1000_intr;
276 int irq_flags = IRQF_SHARED; 276 int irq_flags = IRQF_SHARED;
277 int err; 277 int err;
278 278
279 if (adapter->hw.mac_type >= e1000_82571) { 279 if (adapter->hw.mac_type >= e1000_82571) {
280 adapter->have_msi = !pci_enable_msi(adapter->pdev); 280 adapter->have_msi = !pci_enable_msi(adapter->pdev);
281 if (adapter->have_msi) { 281 if (adapter->have_msi) {
282 handler = &e1000_intr_msi; 282 handler = e1000_intr_msi;
283 irq_flags = 0; 283 irq_flags = 0;
284 } 284 }
285 } 285 }
@@ -4092,8 +4092,8 @@ e1000_rx_checksum(struct e1000_adapter *adapter,
4092 /* Hardware complements the payload checksum, so we undo it 4092 /* Hardware complements the payload checksum, so we undo it
4093 * and then put the value in host order for further stack use. 4093 * and then put the value in host order for further stack use.
4094 */ 4094 */
4095 csum = ntohl(csum ^ 0xFFFF); 4095 __sum16 sum = (__force __sum16)htons(csum);
4096 skb->csum = csum; 4096 skb->csum = csum_unfold(~sum);
4097 skb->ip_summed = CHECKSUM_COMPLETE; 4097 skb->ip_summed = CHECKSUM_COMPLETE;
4098 } 4098 }
4099 adapter->hw_csum_good++; 4099 adapter->hw_csum_good++;
@@ -4621,7 +4621,7 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
4621 rx_desc->read.buffer_addr[j+1] = 4621 rx_desc->read.buffer_addr[j+1] =
4622 cpu_to_le64(ps_page_dma->ps_page_dma[j]); 4622 cpu_to_le64(ps_page_dma->ps_page_dma[j]);
4623 } else 4623 } else
4624 rx_desc->read.buffer_addr[j+1] = ~0; 4624 rx_desc->read.buffer_addr[j+1] = ~cpu_to_le64(0);
4625 } 4625 }
4626 4626
4627 skb = netdev_alloc_skb(netdev, 4627 skb = netdev_alloc_skb(netdev,