Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=881a045fc5b454b57c69e010acecd5830d87e242
Commit:     881a045fc5b454b57c69e010acecd5830d87e242
Parent:     f0938401f2252bf39615c0815734650eab9053c8
Author:     Steve Wise <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 15 16:50:17 2006 -0600
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Sun Jan 7 20:15:58 2007 -0800

    RDMA/iwcm: iWARP connection timeouts shouldn't be reported as rejects
    
    The iWARP CM should report timeouts as event RDMA_CM_EVENT_UNREACHABLE,
    not event RDMA_CM_EVENT_REJECTED.
    
    Signed-off-by: Steve Wise <[EMAIL PROTECTED]>
    Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/core/cma.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 533193d..9e0ab04 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1088,10 +1088,21 @@ static int cma_iw_handler(struct iw_cm_id *iw_id, 
struct iw_cm_event *iw_event)
                *sin = iw_event->local_addr;
                sin = (struct sockaddr_in *) &id_priv->id.route.addr.dst_addr;
                *sin = iw_event->remote_addr;
-               if (iw_event->status)
-                       event.event = RDMA_CM_EVENT_REJECTED;
-               else
+               switch (iw_event->status) {
+               case 0:
                        event.event = RDMA_CM_EVENT_ESTABLISHED;
+                       break;
+               case -ECONNRESET:
+               case -ECONNREFUSED:
+                       event.event = RDMA_CM_EVENT_REJECTED;
+                       break;
+               case -ETIMEDOUT:
+                       event.event = RDMA_CM_EVENT_UNREACHABLE;
+                       break;
+               default:
+                       event.event = RDMA_CM_EVENT_CONNECT_ERROR;
+                       break;
+               }
                break;
        case IW_CM_EVENT_ESTABLISHED:
                event.event = RDMA_CM_EVENT_ESTABLISHED;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to