Commit 66341fff authored by Al Viro's avatar Al Viro Committed by David S. Miller

annotate myri10ge

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 05e5c116
...@@ -185,7 +185,7 @@ struct myri10ge_priv { ...@@ -185,7 +185,7 @@ struct myri10ge_priv {
dma_addr_t fw_stats_bus; dma_addr_t fw_stats_bus;
struct pci_dev *pdev; struct pci_dev *pdev;
int msi_enabled; int msi_enabled;
__be32 link_state; u32 link_state;
unsigned int rdma_tags_available; unsigned int rdma_tags_available;
int intr_coal_delay; int intr_coal_delay;
__be32 __iomem *intr_coal_delay_ptr; __be32 __iomem *intr_coal_delay_ptr;
...@@ -576,7 +576,7 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp) ...@@ -576,7 +576,7 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp)
int status; int status;
/* find running firmware header */ /* find running firmware header */
hdr_offset = ntohl(__raw_readl(mgp->sram + MCP_HEADER_PTR_OFFSET)); hdr_offset = swab32(readl(mgp->sram + MCP_HEADER_PTR_OFFSET));
if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > mgp->sram_size) { if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > mgp->sram_size) {
dev_err(dev, "Running firmware has bad header offset (%d)\n", 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,7 +1053,10 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
rx_frags[0].size -= MXGEFW_PAD; rx_frags[0].size -= MXGEFW_PAD;
len -= MXGEFW_PAD; len -= MXGEFW_PAD;
lro_receive_frags(&mgp->rx_done.lro_mgr, rx_frags, lro_receive_frags(&mgp->rx_done.lro_mgr, rx_frags,
len, len, (void *)(unsigned long)csum, csum); len, len,
/* opaque, will come back in get_frag_header */
(void *)(__force unsigned long)csum,
csum);
return 1; return 1;
} }
...@@ -1786,7 +1789,8 @@ myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr, ...@@ -1786,7 +1789,8 @@ myri10ge_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
struct iphdr *iph; struct iphdr *iph;
u8 *va = page_address(frag->page) + frag->page_offset; u8 *va = page_address(frag->page) + frag->page_offset;
unsigned long ll_hlen; unsigned long ll_hlen;
__wsum csum = (__wsum) (unsigned long)priv; /* passed opaque through lro_receive_frags() */
__wsum csum = (__force __wsum) (unsigned long)priv;
/* find the mac header, aborting if not IPv4 */ /* find the mac header, aborting if not IPv4 */
...@@ -1967,7 +1971,7 @@ static int myri10ge_open(struct net_device *dev) ...@@ -1967,7 +1971,7 @@ static int myri10ge_open(struct net_device *dev)
goto abort_with_rings; goto abort_with_rings;
} }
mgp->link_state = htonl(~0U); mgp->link_state = ~0U;
mgp->rdma_tags_available = 15; mgp->rdma_tags_available = 15;
lro_mgr = &mgp->rx_done.lro_mgr; lro_mgr = &mgp->rx_done.lro_mgr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment