aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/kernel/xpnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/sn/kernel/xpnet.c')
-rw-r--r--arch/ia64/sn/kernel/xpnet.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c
index c8173db0d84f..5419acb89a8c 100644
--- a/arch/ia64/sn/kernel/xpnet.c
+++ b/arch/ia64/sn/kernel/xpnet.c
@@ -233,7 +233,7 @@ xpnet_receive(partid_t partid, int channel, struct xpnet_message *msg)
233 "%lu)\n", skb->data, &msg->data, 233 "%lu)\n", skb->data, &msg->data,
234 (size_t) msg->embedded_bytes); 234 (size_t) msg->embedded_bytes);
235 235
236 memcpy(skb->data, &msg->data, (size_t) msg->embedded_bytes); 236 skb_copy_to_linear_data(skb, &msg->data, (size_t)msg->embedded_bytes);
237 } else { 237 } else {
238 dev_dbg(xpnet, "transferring buffer to the skb->data area;\n\t" 238 dev_dbg(xpnet, "transferring buffer to the skb->data area;\n\t"
239 "bte_copy(0x%p, 0x%p, %hu)\n", (void *)msg->buf_pa, 239 "bte_copy(0x%p, 0x%p, %hu)\n", (void *)msg->buf_pa,
@@ -264,17 +264,16 @@ xpnet_receive(partid_t partid, int channel, struct xpnet_message *msg)
264 264
265 dev_dbg(xpnet, "<skb->head=0x%p skb->data=0x%p skb->tail=0x%p " 265 dev_dbg(xpnet, "<skb->head=0x%p skb->data=0x%p skb->tail=0x%p "
266 "skb->end=0x%p skb->len=%d\n", (void *) skb->head, 266 "skb->end=0x%p skb->len=%d\n", (void *) skb->head,
267 (void *) skb->data, (void *) skb->tail, (void *) skb->end, 267 (void *)skb->data, skb_tail_pointer(skb), skb_end_pointer(skb),
268 skb->len); 268 skb->len);
269 269
270 skb->dev = xpnet_device;
271 skb->protocol = eth_type_trans(skb, xpnet_device); 270 skb->protocol = eth_type_trans(skb, xpnet_device);
272 skb->ip_summed = CHECKSUM_UNNECESSARY; 271 skb->ip_summed = CHECKSUM_UNNECESSARY;
273 272
274 dev_dbg(xpnet, "passing skb to network layer; \n\tskb->head=0x%p " 273 dev_dbg(xpnet, "passing skb to network layer; \n\tskb->head=0x%p "
275 "skb->data=0x%p skb->tail=0x%p skb->end=0x%p skb->len=%d\n", 274 "skb->data=0x%p skb->tail=0x%p skb->end=0x%p skb->len=%d\n",
276 (void *) skb->head, (void *) skb->data, (void *) skb->tail, 275 (void *)skb->head, (void *)skb->data, skb_tail_pointer(skb),
277 (void *) skb->end, skb->len); 276 skb_end_pointer(skb), skb->len);
278 277
279 278
280 xpnet_device->last_rx = jiffies; 279 xpnet_device->last_rx = jiffies;
@@ -476,7 +475,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
476 475
477 dev_dbg(xpnet, ">skb->head=0x%p skb->data=0x%p skb->tail=0x%p " 476 dev_dbg(xpnet, ">skb->head=0x%p skb->data=0x%p skb->tail=0x%p "
478 "skb->end=0x%p skb->len=%d\n", (void *) skb->head, 477 "skb->end=0x%p skb->len=%d\n", (void *) skb->head,
479 (void *) skb->data, (void *) skb->tail, (void *) skb->end, 478 (void *)skb->data, skb_tail_pointer(skb), skb_end_pointer(skb),
480 skb->len); 479 skb->len);
481 480
482 481
@@ -498,7 +497,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
498 497
499 /* get the beginning of the first cacheline and end of last */ 498 /* get the beginning of the first cacheline and end of last */
500 start_addr = ((u64) skb->data & ~(L1_CACHE_BYTES - 1)); 499 start_addr = ((u64) skb->data & ~(L1_CACHE_BYTES - 1));
501 end_addr = L1_CACHE_ALIGN((u64) skb->tail); 500 end_addr = L1_CACHE_ALIGN((u64)skb_tail_pointer(skb));
502 501
503 /* calculate how many bytes to embed in the XPC message */ 502 /* calculate how many bytes to embed in the XPC message */
504 embedded_bytes = 0; 503 embedded_bytes = 0;
@@ -567,14 +566,15 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
567 msg->version = XPNET_VERSION_EMBED; 566 msg->version = XPNET_VERSION_EMBED;
568 dev_dbg(xpnet, "calling memcpy(0x%p, 0x%p, 0x%lx)\n", 567 dev_dbg(xpnet, "calling memcpy(0x%p, 0x%p, 0x%lx)\n",
569 &msg->data, skb->data, (size_t) embedded_bytes); 568 &msg->data, skb->data, (size_t) embedded_bytes);
570 memcpy(&msg->data, skb->data, (size_t) embedded_bytes); 569 skb_copy_from_linear_data(skb, &msg->data,
570 (size_t)embedded_bytes);
571 } else { 571 } else {
572 msg->version = XPNET_VERSION; 572 msg->version = XPNET_VERSION;
573 } 573 }
574 msg->magic = XPNET_MAGIC; 574 msg->magic = XPNET_MAGIC;
575 msg->size = end_addr - start_addr; 575 msg->size = end_addr - start_addr;
576 msg->leadin_ignore = (u64) skb->data - start_addr; 576 msg->leadin_ignore = (u64) skb->data - start_addr;
577 msg->tailout_ignore = end_addr - (u64) skb->tail; 577 msg->tailout_ignore = end_addr - (u64)skb_tail_pointer(skb);
578 msg->buf_pa = __pa(start_addr); 578 msg->buf_pa = __pa(start_addr);
579 579
580 dev_dbg(xpnet, "sending XPC message to %d:%d\nmsg->buf_pa=" 580 dev_dbg(xpnet, "sending XPC message to %d:%d\nmsg->buf_pa="