diff options
author | Dean Nelson <dcn@sgi.com> | 2008-07-30 01:34:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:50 -0400 |
commit | 261f3b4979db88d29fc86aad9f76fbc0c2c6d21a (patch) | |
tree | 1cd1012b3ab52747a12e47f630b864d27af0bdf5 /drivers/misc/sgi-xp/xpnet.c | |
parent | 81fe7883d2c8a80a7145ad22f8cd8514d05412b9 (diff) |
sgi-xp: enable building of XPC/XPNET on x86_64
Get XPC/XPNET to build on x86_64. Trying to modprobe them up on a non-UV
or sn2 system will result in a -ENODEV.
Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.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 | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 07c89c4e2c25..49385f441705 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c | |||
@@ -21,17 +21,8 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
28 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
29 | #include <linux/delay.h> | ||
30 | #include <linux/ethtool.h> | ||
31 | #include <linux/mii.h> | ||
32 | #include <linux/smp.h> | ||
33 | #include <linux/string.h> | ||
34 | #include <asm/atomic.h> | ||
35 | #include "xp.h" | 26 | #include "xp.h" |
36 | 27 | ||
37 | /* | 28 | /* |
@@ -175,8 +166,9 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg) | |||
175 | 166 | ||
176 | return; | 167 | return; |
177 | } | 168 | } |
178 | dev_dbg(xpnet, "received 0x%lx, %d, %d, %d\n", msg->buf_pa, msg->size, | 169 | dev_dbg(xpnet, "received 0x%lx, %d, %d, %d\n", |
179 | msg->leadin_ignore, msg->tailout_ignore); | 170 | (unsigned long)msg->buf_pa, msg->size, msg->leadin_ignore, |
171 | msg->tailout_ignore); | ||
180 | 172 | ||
181 | /* reserve an extra cache line */ | 173 | /* reserve an extra cache line */ |
182 | skb = dev_alloc_skb(msg->size + L1_CACHE_BYTES); | 174 | skb = dev_alloc_skb(msg->size + L1_CACHE_BYTES); |
@@ -320,8 +312,10 @@ xpnet_dev_open(struct net_device *dev) | |||
320 | 312 | ||
321 | dev_dbg(xpnet, "calling xpc_connect(%d, 0x%p, NULL, %ld, %ld, %ld, " | 313 | dev_dbg(xpnet, "calling xpc_connect(%d, 0x%p, NULL, %ld, %ld, %ld, " |
322 | "%ld)\n", XPC_NET_CHANNEL, xpnet_connection_activity, | 314 | "%ld)\n", XPC_NET_CHANNEL, xpnet_connection_activity, |
323 | XPNET_MSG_SIZE, XPNET_MSG_NENTRIES, XPNET_MAX_KTHREADS, | 315 | (unsigned long)XPNET_MSG_SIZE, |
324 | XPNET_MAX_IDLE_KTHREADS); | 316 | (unsigned long)XPNET_MSG_NENTRIES, |
317 | (unsigned long)XPNET_MAX_KTHREADS, | ||
318 | (unsigned long)XPNET_MAX_IDLE_KTHREADS); | ||
325 | 319 | ||
326 | ret = xpc_connect(XPC_NET_CHANNEL, xpnet_connection_activity, NULL, | 320 | ret = xpc_connect(XPC_NET_CHANNEL, xpnet_connection_activity, NULL, |
327 | XPNET_MSG_SIZE, XPNET_MSG_NENTRIES, | 321 | XPNET_MSG_SIZE, XPNET_MSG_NENTRIES, |
@@ -439,8 +433,8 @@ xpnet_send(struct sk_buff *skb, struct xpnet_pending_msg *queued_msg, | |||
439 | dev_dbg(xpnet, "sending XPC message to %d:%d\n" | 433 | dev_dbg(xpnet, "sending XPC message to %d:%d\n" |
440 | KERN_DEBUG "msg->buf_pa=0x%lx, msg->size=%u, " | 434 | KERN_DEBUG "msg->buf_pa=0x%lx, msg->size=%u, " |
441 | "msg->leadin_ignore=%u, msg->tailout_ignore=%u\n", | 435 | "msg->leadin_ignore=%u, msg->tailout_ignore=%u\n", |
442 | dest_partid, XPC_NET_CHANNEL, msg->buf_pa, msg->size, | 436 | dest_partid, XPC_NET_CHANNEL, (unsigned long)msg->buf_pa, |
443 | msg->leadin_ignore, msg->tailout_ignore); | 437 | msg->size, msg->leadin_ignore, msg->tailout_ignore); |
444 | 438 | ||
445 | atomic_inc(&queued_msg->use_count); | 439 | atomic_inc(&queued_msg->use_count); |
446 | 440 | ||
@@ -602,8 +596,8 @@ xpnet_init(void) | |||
602 | */ | 596 | */ |
603 | xpnet_device->dev_addr[0] = 0x02; /* locally administered, no OUI */ | 597 | xpnet_device->dev_addr[0] = 0x02; /* locally administered, no OUI */ |
604 | 598 | ||
605 | xpnet_device->dev_addr[XPNET_PARTID_OCTET + 1] = sn_partition_id; | 599 | xpnet_device->dev_addr[XPNET_PARTID_OCTET + 1] = xp_partition_id; |
606 | xpnet_device->dev_addr[XPNET_PARTID_OCTET + 0] = (sn_partition_id >> 8); | 600 | xpnet_device->dev_addr[XPNET_PARTID_OCTET + 0] = (xp_partition_id >> 8); |
607 | 601 | ||
608 | /* | 602 | /* |
609 | * ether_setup() sets this to a multicast device. We are | 603 | * ether_setup() sets this to a multicast device. We are |