diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-12-22 13:56:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:31 -0500 |
commit | 66341fffd4e5e546906ebcfeb6f5cce8df802c17 (patch) | |
tree | 4101824e02b1ada17854e83c7aa60d82ae5ca78a /drivers/net/myri10ge/myri10ge.c | |
parent | 05e5c1165393a2d6044b01288f089d2e74a49d58 (diff) |
annotate myri10ge
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 6bdabc3a84bf..cead81e80f0c 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -185,7 +185,7 @@ struct myri10ge_priv { | |||
185 | dma_addr_t fw_stats_bus; | 185 | dma_addr_t fw_stats_bus; |
186 | struct pci_dev *pdev; | 186 | struct pci_dev *pdev; |
187 | int msi_enabled; | 187 | int msi_enabled; |
188 | __be32 link_state; | 188 | u32 link_state; |
189 | unsigned int rdma_tags_available; | 189 | unsigned int rdma_tags_available; |
190 | int intr_coal_delay; | 190 | int intr_coal_delay; |
191 | __be32 __iomem *intr_coal_delay_ptr; | 191 | __be32 __iomem *intr_coal_delay_ptr; |
@@ -576,7 +576,7 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp) | |||
576 | int status; | 576 | int status; |
577 | 577 | ||
578 | /* find running firmware header */ | 578 | /* find running firmware header */ |
579 | hdr_offset = ntohl(__raw_readl(mgp->sram + MCP_HEADER_PTR_OFFSET)); | 579 | hdr_offset = swab32(readl(mgp->sram + MCP_HEADER_PTR_OFFSET)); |
580 | 580 | ||
581 | if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > mgp->sram_size) { | 581 | if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > mgp->sram_size) { |
582 | dev_err(dev, "Running firmware has bad header offset (%d)\n", | 582 | dev_err(dev, "Running firmware has bad header offset (%d)\n", |
@@ -1053,7 +1053,10 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, | |||
1053 | rx_frags[0].size -= MXGEFW_PAD; | 1053 | rx_frags[0].size -= MXGEFW_PAD; |
1054 | len -= MXGEFW_PAD; | 1054 | len -= MXGEFW_PAD; |
1055 | lro_receive_frags(&mgp->rx_done.lro_mgr, rx_frags, | 1055 | lro_receive_frags(&mgp->rx_done.lro_mgr, rx_frags, |
1056 | len, len, (void *)(unsigned long)csum, csum); | 1056 | len, len, |
1057 | /* opaque, will come back in get_frag_header */ | ||
1058 | (void *)(__force unsigned long)csum, | ||
1059 | csum); | ||
1057 | return 1; | 1060 | return 1; |
1058 | } | 1061 | } |
1059 | 1062 | ||
@@ -1786,7 +1789,8 @@ myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr, | |||
1786 | struct iphdr *iph; | 1789 | struct iphdr *iph; |
1787 | u8 *va = page_address(frag->page) + frag->page_offset; | 1790 | u8 *va = page_address(frag->page) + frag->page_offset; |
1788 | unsigned long ll_hlen; | 1791 | unsigned long ll_hlen; |
1789 | __wsum csum = (__wsum) (unsigned long)priv; | 1792 | /* passed opaque through lro_receive_frags() */ |
1793 | __wsum csum = (__force __wsum) (unsigned long)priv; | ||
1790 | 1794 | ||
1791 | /* find the mac header, aborting if not IPv4 */ | 1795 | /* find the mac header, aborting if not IPv4 */ |
1792 | 1796 | ||
@@ -1967,7 +1971,7 @@ static int myri10ge_open(struct net_device *dev) | |||
1967 | goto abort_with_rings; | 1971 | goto abort_with_rings; |
1968 | } | 1972 | } |
1969 | 1973 | ||
1970 | mgp->link_state = htonl(~0U); | 1974 | mgp->link_state = ~0U; |
1971 | mgp->rdma_tags_available = 15; | 1975 | mgp->rdma_tags_available = 15; |
1972 | 1976 | ||
1973 | lro_mgr = &mgp->rx_done.lro_mgr; | 1977 | lro_mgr = &mgp->rx_done.lro_mgr; |