aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpnet.c
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 01:34:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:49 -0400
commitbc63d387e4f5dbbe4ea0c5ade862c38073fd7fa3 (patch)
treeebeb9a381224a935fc50697902fcc38b9df47d90 /drivers/misc/sgi-xp/xpnet.c
parent78ce1bbe446e9b46dcd6c1e60a4768448a8ce355 (diff)
sgi-xp: support runtime selection of xp_max_npartitions
Support runtime selection of the max number of partitions based on the hardware being run on. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
index 822dc8e8d7f0..cc252f201b25 100644
--- a/drivers/misc/sgi-xp/xpnet.c
+++ b/drivers/misc/sgi-xp/xpnet.c
@@ -287,7 +287,7 @@ xpnet_connection_activity(enum xp_retval reason, short partid, int channel,
287{ 287{
288 long bp; 288 long bp;
289 289
290 DBUG_ON(partid <= 0 || partid >= XP_MAX_PARTITIONS); 290 DBUG_ON(partid < 0 || partid >= xp_max_npartitions);
291 DBUG_ON(channel != XPC_NET_CHANNEL); 291 DBUG_ON(channel != XPC_NET_CHANNEL);
292 292
293 switch (reason) { 293 switch (reason) {
@@ -513,7 +513,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
513 /* 513 /*
514 * Main send loop. 514 * Main send loop.
515 */ 515 */
516 for (dest_partid = 1; dp && dest_partid < XP_MAX_PARTITIONS; 516 for (dest_partid = 0; dp && dest_partid < xp_max_npartitions;
517 dest_partid++) { 517 dest_partid++) {
518 518
519 if (!(dp & (1UL << (dest_partid - 1)))) { 519 if (!(dp & (1UL << (dest_partid - 1)))) {