[openib-general] [BUG] Byte swapped Pkeys

Roland Dreier roland at topspin.com
Wed Sep 15 14:47:10 PDT 2004


I see one problem, I think.  Can you try this?

Thanks,
  Roland

Index: infiniband/hw/mthca/mthca_provider.c
===================================================================
--- infiniband/hw/mthca/mthca_provider.c	(revision 824)
+++ infiniband/hw/mthca/mthca_provider.c	(working copy)
@@ -166,7 +166,7 @@
 		goto out;
 	}
 
-	*pkey = ((u16 *) (out_mad->data + 40))[index % 32];
+	*pkey = be16_to_cpu(((u16 *) (out_mad->data + 40))[index % 32]);
 
  out:
 	kfree(in_mad);



More information about the general mailing list