summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorJianxin Xiong <jianxin.xiong@intel.com>2016-05-12 10:23:47 -0700
committerDoug Ledford <dledford@redhat.com>2016-05-13 19:39:19 -0400
commit859b527f00ad1364a4152c0365e2e5ef5a6bf20a (patch)
treef0a347e28e4949c82f8d3f8883e71496c6439ea3 /drivers/staging
parentf036780be8ac7abee912bd1eeb459230e6bcc878 (diff)
IB/hfi1: Keep SC_USER as the last send context type
SC_USER needs to be the last send context type to ensure other send context types get their allocation when num_user_contexts is set to a large number. This fixes a panic when the module parameter num_user_contexts is set to 141 and larger. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rdma/hfi1/pio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/pio.h b/drivers/staging/rdma/hfi1/pio.h
index 53a08edb7f64..464cbd27b975 100644
--- a/drivers/staging/rdma/hfi1/pio.h
+++ b/drivers/staging/rdma/hfi1/pio.h
@@ -49,10 +49,10 @@
/* send context types */
#define SC_KERNEL 0
-#define SC_ACK 1
-#define SC_USER 2
-#define SC_VL15 3
-#define SC_MAX 4
+#define SC_VL15 1
+#define SC_ACK 2
+#define SC_USER 3 /* must be the last one: it may take all left */
+#define SC_MAX 4 /* count of send context types */
/* invalid send context index */
#define INVALID_SCI 0xff