fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / infiniband / core / smi.c
index 6adf653..54b81e1 100644 (file)
@@ -1,9 +1,10 @@
 /*
- * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
- * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
- * Copyright (c) 2004 Intel Corporation.  All rights reserved.
- * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
- * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ * Copyright (c) 2004, 2005 Mellanox Technologies Ltd.  All rights reserved.
+ * Copyright (c) 2004, 2005 Infinicon Corporation.  All rights reserved.
+ * Copyright (c) 2004, 2005 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Corporation.  All rights reserved.
+ * Copyright (c) 2004, 2005 Voltaire Corporation.  All rights reserved.
+ * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -36,8 +37,8 @@
  * $Id: smi.c 1389 2004-12-27 22:56:47Z roland $
  */
 
-#include <ib_smi.h>
-
+#include <rdma/ib_smi.h>
+#include "smi.h"
 
 /*
  * Fixup a directed route SMP for sending
@@ -63,7 +64,7 @@ int smi_handle_dr_smp_send(struct ib_smp *smp,
 
                /* C14-9:2 */
                if (hop_ptr && hop_ptr < hop_cnt) {
-                       if (node_type != IB_NODE_SWITCH)
+                       if (node_type != RDMA_NODE_IB_SWITCH)
                                return 0;
 
                        /* smp->return_path set when received */
@@ -76,7 +77,7 @@ int smi_handle_dr_smp_send(struct ib_smp *smp,
                if (hop_ptr == hop_cnt) {
                        /* smp->return_path set when received */
                        smp->hop_ptr++;
-                       return (node_type == IB_NODE_SWITCH ||
+                       return (node_type == RDMA_NODE_IB_SWITCH ||
                                smp->dr_dlid == IB_LID_PERMISSIVE);
                }
 
@@ -94,7 +95,7 @@ int smi_handle_dr_smp_send(struct ib_smp *smp,
 
                /* C14-13:2 */
                if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
-                       if (node_type != IB_NODE_SWITCH)
+                       if (node_type != RDMA_NODE_IB_SWITCH)
                                return 0;
 
                        smp->hop_ptr--;
@@ -106,7 +107,7 @@ int smi_handle_dr_smp_send(struct ib_smp *smp,
                if (hop_ptr == 1) {
                        smp->hop_ptr--;
                        /* C14-13:3 -- SMPs destined for SM shouldn't be here */
-                       return (node_type == IB_NODE_SWITCH ||
+                       return (node_type == RDMA_NODE_IB_SWITCH ||
                                smp->dr_slid == IB_LID_PERMISSIVE);
                }
 
@@ -141,7 +142,7 @@ int smi_handle_dr_smp_recv(struct ib_smp *smp,
 
                /* C14-9:2 -- intermediate hop */
                if (hop_ptr && hop_ptr < hop_cnt) {
-                       if (node_type != IB_NODE_SWITCH)
+                       if (node_type != RDMA_NODE_IB_SWITCH)
                                return 0;
 
                        smp->return_path[hop_ptr] = port_num;
@@ -155,7 +156,7 @@ int smi_handle_dr_smp_recv(struct ib_smp *smp,
                                smp->return_path[hop_ptr] = port_num;
                        /* smp->hop_ptr updated when sending */
 
-                       return (node_type == IB_NODE_SWITCH ||
+                       return (node_type == RDMA_NODE_IB_SWITCH ||
                                smp->dr_dlid == IB_LID_PERMISSIVE);
                }
 
@@ -174,7 +175,7 @@ int smi_handle_dr_smp_recv(struct ib_smp *smp,
 
                /* C14-13:2 */
                if (2 <= hop_ptr && hop_ptr <= hop_cnt) {
-                       if (node_type != IB_NODE_SWITCH)
+                       if (node_type != RDMA_NODE_IB_SWITCH)
                                return 0;
 
                        /* smp->hop_ptr updated when sending */
@@ -189,7 +190,7 @@ int smi_handle_dr_smp_recv(struct ib_smp *smp,
                                return 1;
                        }
                        /* smp->hop_ptr updated when sending */
-                       return (node_type == IB_NODE_SWITCH);
+                       return (node_type == RDMA_NODE_IB_SWITCH);
                }
 
                /* C14-13:4 -- hop_ptr = 0 -> give to SM */