diff options
author | Dean Nelson <dcn@sgi.com> | 2008-07-30 01:34:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:49 -0400 |
commit | 97bf1aa1e1bb18de9bb1987c6eb9ad751bf08aab (patch) | |
tree | c07472cdffc9c53aefa7f7eeb6098b18bc4f7ac1 /drivers/misc/sgi-xp/xpnet.c | |
parent | aaa3cd694c0c4ae534e8aafdf4227e395c57d6bd (diff) |
sgi-xp: move xpc_allocate() into xpc_send()/xpc_send_notify()
Move xpc_allocate() functionality into xpc_send()/xpc_send_notify() so
xpc_allocate() no longer needs to be called by XPNET.
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-xp/xpnet.c')
-rw-r--r-- | drivers/misc/sgi-xp/xpnet.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 9c540eb1847d..f9356ba73155 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c | |||
@@ -438,7 +438,8 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
438 | { | 438 | { |
439 | struct xpnet_pending_msg *queued_msg; | 439 | struct xpnet_pending_msg *queued_msg; |
440 | enum xp_retval ret; | 440 | enum xp_retval ret; |
441 | struct xpnet_message *msg; | 441 | u8 msg_buffer[XPNET_MSG_SIZE]; |
442 | struct xpnet_message *msg = (struct xpnet_message *)&msg_buffer[0]; | ||
442 | u64 start_addr, end_addr; | 443 | u64 start_addr, end_addr; |
443 | long dp; | 444 | long dp; |
444 | u8 second_mac_octet; | 445 | u8 second_mac_octet; |
@@ -524,11 +525,6 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
524 | 525 | ||
525 | /* found a partition to send to */ | 526 | /* found a partition to send to */ |
526 | 527 | ||
527 | ret = xpc_allocate(dest_partid, XPC_NET_CHANNEL, | ||
528 | XPC_NOWAIT, (void **)&msg); | ||
529 | if (unlikely(ret != xpSuccess)) | ||
530 | continue; | ||
531 | |||
532 | msg->embedded_bytes = embedded_bytes; | 528 | msg->embedded_bytes = embedded_bytes; |
533 | if (unlikely(embedded_bytes != 0)) { | 529 | if (unlikely(embedded_bytes != 0)) { |
534 | msg->version = XPNET_VERSION_EMBED; | 530 | msg->version = XPNET_VERSION_EMBED; |
@@ -553,7 +549,8 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
553 | 549 | ||
554 | atomic_inc(&queued_msg->use_count); | 550 | atomic_inc(&queued_msg->use_count); |
555 | 551 | ||
556 | ret = xpc_send_notify(dest_partid, XPC_NET_CHANNEL, msg, | 552 | ret = xpc_send_notify(dest_partid, XPC_NET_CHANNEL, XPC_NOWAIT, |
553 | &msg, sizeof(msg) + embedded_bytes - 1, | ||
557 | xpnet_send_completed, queued_msg); | 554 | xpnet_send_completed, queued_msg); |
558 | if (unlikely(ret != xpSuccess)) { | 555 | if (unlikely(ret != xpSuccess)) { |
559 | atomic_dec(&queued_msg->use_count); | 556 | atomic_dec(&queued_msg->use_count); |