diff --git a/lnet/include/linux/libcfs.h b/lnet/include/linux/libcfs.h
index 6bd9196631eb0bb33fcf526b839149abee5b31d9..b725a568dbeb29ffc7dafd9dceaa6b4486fb3680 100644
--- a/lnet/include/linux/libcfs.h
+++ b/lnet/include/linux/libcfs.h
@@ -221,6 +221,25 @@ do {                                                                    \
 #define EXIT                            do { } while (0)
 #endif
 
+/* initial pid  */
+# if CRAY_PORTALS
+/* 
+ *
+ * 1) ptl_pid_t in cray portals is only 16 bits, not 32 bits, therefore this is too
+ * big.
+ *
+ * 2) the implementation of ernal in cray portals further restricts the pid space
+ * that may be used to 0 <= pid <= 255 (an 8 bit value).  Returns an error at nal
+ * init time for any pid outside this range.  Other nals in cray portals don't have
+ * this restriction.
+ * */
+#define LUSTRE_PTL_PID          9
+# else
+#define LUSTRE_PTL_PID          12345
+# endif
+
+#define LUSTRE_SRV_PTL_PID      LUSTRE_PTL_PID    
+
 #define PORTALS_CFG_VERSION 0x00010001;
 
 struct portals_cfg {
diff --git a/lnet/klnds/qswlnd/qswlnd.h b/lnet/klnds/qswlnd/qswlnd.h
index bc4b2fdb19a90d1e52603bdf41910594350a0189..b085caae96b22255830ff899598ec4c0e15ef0c0 100644
--- a/lnet/klnds/qswlnd/qswlnd.h
+++ b/lnet/klnds/qswlnd/qswlnd.h
@@ -79,7 +79,6 @@
 #include <portals/p30.h>
 #include <portals/lib-p30.h>
 #include <portals/nal.h>
-#include <linux/lustre_idl.h>
 
 #define KQSW_CHECKSUM   0
 #if KQSW_CHECKSUM
diff --git a/lnet/lnet/module.c b/lnet/lnet/module.c
index d292a501a057de31388bd608e0c385be870287f5..eb41dfd16a3843d8d754dacdc791ae3a9dbb87c9 100644
--- a/lnet/lnet/module.c
+++ b/lnet/lnet/module.c
@@ -50,7 +50,6 @@
 #include <linux/kp30.h>
 #include <linux/kpr.h>
 #include <linux/portals_compat25.h>
-#include <linux/lustre_idl.h>
 
 extern void (kping_client)(struct portal_ioctl_data *);
 
diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h
index b0d32e54d151dfb1c2da960a3a1d0f56e8418364..8fb130376f82b57099de7ab3d11adf329d7be740 100644
--- a/lustre/include/linux/lustre_idl.h
+++ b/lustre/include/linux/lustre_idl.h
@@ -137,10 +137,6 @@
 #define LUSTRE_LOG_VERSION  0x00050000
 #define LUSTRE_PBD_VERSION  0x00060000
 
-/* initial pid  */
-#define LUSTRE_PTL_PID          999999
-#define LUSTRE_SRV_PTL_PID      LUSTRE_PTL_PID    
-
 struct lustre_handle {
         __u64 cookie;
 };
diff --git a/lustre/portals/include/linux/libcfs.h b/lustre/portals/include/linux/libcfs.h
index 6bd9196631eb0bb33fcf526b839149abee5b31d9..b725a568dbeb29ffc7dafd9dceaa6b4486fb3680 100644
--- a/lustre/portals/include/linux/libcfs.h
+++ b/lustre/portals/include/linux/libcfs.h
@@ -221,6 +221,25 @@ do {                                                                    \
 #define EXIT                            do { } while (0)
 #endif
 
+/* initial pid  */
+# if CRAY_PORTALS
+/* 
+ *
+ * 1) ptl_pid_t in cray portals is only 16 bits, not 32 bits, therefore this is too
+ * big.
+ *
+ * 2) the implementation of ernal in cray portals further restricts the pid space
+ * that may be used to 0 <= pid <= 255 (an 8 bit value).  Returns an error at nal
+ * init time for any pid outside this range.  Other nals in cray portals don't have
+ * this restriction.
+ * */
+#define LUSTRE_PTL_PID          9
+# else
+#define LUSTRE_PTL_PID          12345
+# endif
+
+#define LUSTRE_SRV_PTL_PID      LUSTRE_PTL_PID    
+
 #define PORTALS_CFG_VERSION 0x00010001;
 
 struct portals_cfg {
diff --git a/lustre/portals/knals/qswnal/qswnal.h b/lustre/portals/knals/qswnal/qswnal.h
index bc4b2fdb19a90d1e52603bdf41910594350a0189..b085caae96b22255830ff899598ec4c0e15ef0c0 100644
--- a/lustre/portals/knals/qswnal/qswnal.h
+++ b/lustre/portals/knals/qswnal/qswnal.h
@@ -79,7 +79,6 @@
 #include <portals/p30.h>
 #include <portals/lib-p30.h>
 #include <portals/nal.h>
-#include <linux/lustre_idl.h>
 
 #define KQSW_CHECKSUM   0
 #if KQSW_CHECKSUM
diff --git a/lustre/portals/portals/module.c b/lustre/portals/portals/module.c
index d292a501a057de31388bd608e0c385be870287f5..eb41dfd16a3843d8d754dacdc791ae3a9dbb87c9 100644
--- a/lustre/portals/portals/module.c
+++ b/lustre/portals/portals/module.c
@@ -50,7 +50,6 @@
 #include <linux/kp30.h>
 #include <linux/kpr.h>
 #include <linux/portals_compat25.h>
-#include <linux/lustre_idl.h>
 
 extern void (kping_client)(struct portal_ioctl_data *);