aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2011-05-10 01:23:57 -0400
committerRoland Dreier <roland@purestorage.com>2011-05-10 01:23:57 -0400
commitd0c49bf391b2e230a8f3ae4486da7df440f1216d (patch)
tree77c63b308e23c8a97b2fd334ddd820a5f5aac6a2 /include/rdma
parenta9bb79128aa659f97b774b97c9bb1bdc74444595 (diff)
RDMA/iwcm: Get rid of enum iw_cm_event_status
The IW_CM_EVENT_STATUS_xxx values were used in only a couple of places; cma.c uses -Exxx values instead, and so do the amso1100, cxgb3 and cxgb4 drivers -- only nes was using the enum values (with the mild consequence that all nes connection failures were treated as generic errors rather than reported as timeouts or rejections). We can fix this confusion by getting rid of enum iw_cm_event_status and using a plain int for struct iw_cm_event.status, and converting nes to use -Exxx as the other iWARP drivers do. This also gets rid of the warning drivers/infiniband/core/cma.c: In function 'cma_iw_handler': drivers/infiniband/core/cma.c:1333:3: warning: case value '4294967185' not in enumerated type 'enum iw_cm_event_status' drivers/infiniband/core/cma.c:1336:3: warning: case value '4294967186' not in enumerated type 'enum iw_cm_event_status' drivers/infiniband/core/cma.c:1332:3: warning: case value '4294967192' not in enumerated type 'enum iw_cm_event_status' Signed-off-by: Roland Dreier <roland@purestorage.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sean Hefty <sean.hefty@intel.com> Reviewed-by: Faisal Latif <faisal.latif@intel.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/iw_cm.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h
index cbb822e8d791..2d0191c90f9e 100644
--- a/include/rdma/iw_cm.h
+++ b/include/rdma/iw_cm.h
@@ -46,18 +46,9 @@ enum iw_cm_event_type {
46 IW_CM_EVENT_CLOSE /* close complete */ 46 IW_CM_EVENT_CLOSE /* close complete */
47}; 47};
48 48
49enum iw_cm_event_status {
50 IW_CM_EVENT_STATUS_OK = 0, /* request successful */
51 IW_CM_EVENT_STATUS_ACCEPTED = 0, /* connect request accepted */
52 IW_CM_EVENT_STATUS_REJECTED, /* connect request rejected */
53 IW_CM_EVENT_STATUS_TIMEOUT, /* the operation timed out */
54 IW_CM_EVENT_STATUS_RESET, /* reset from remote peer */
55 IW_CM_EVENT_STATUS_EINVAL, /* asynchronous failure for bad parm */
56};
57
58struct iw_cm_event { 49struct iw_cm_event {
59 enum iw_cm_event_type event; 50 enum iw_cm_event_type event;
60 enum iw_cm_event_status status; 51 int status;
61 struct sockaddr_in local_addr; 52 struct sockaddr_in local_addr;
62 struct sockaddr_in remote_addr; 53 struct sockaddr_in remote_addr;
63 void *private_data; 54 void *private_data;