cma.c (a9474917099e007c0f51d5474394b5890111614f) cma.c (468f2239bcc71ae0f345c3fe58c797cf4627daf4)
1/*
2 * Copyright (c) 2005 Voltaire Inc. All rights reserved.
3 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
4 * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved.
5 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

--- 960 unchanged lines hidden (view full) ---

969 case IB_CM_REJ_RECEIVED:
970 cma_modify_qp_err(id_priv);
971 event.status = ib_event->param.rej_rcvd.reason;
972 event.event = RDMA_CM_EVENT_REJECTED;
973 event.param.conn.private_data = ib_event->private_data;
974 event.param.conn.private_data_len = IB_CM_REJ_PRIVATE_DATA_SIZE;
975 break;
976 default:
1/*
2 * Copyright (c) 2005 Voltaire Inc. All rights reserved.
3 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
4 * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved.
5 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

--- 960 unchanged lines hidden (view full) ---

969 case IB_CM_REJ_RECEIVED:
970 cma_modify_qp_err(id_priv);
971 event.status = ib_event->param.rej_rcvd.reason;
972 event.event = RDMA_CM_EVENT_REJECTED;
973 event.param.conn.private_data = ib_event->private_data;
974 event.param.conn.private_data_len = IB_CM_REJ_PRIVATE_DATA_SIZE;
975 break;
976 default:
977 printk(KERN_ERR "RDMA CMA: unexpected IB CM event: %d",
977 printk(KERN_ERR "RDMA CMA: unexpected IB CM event: %d\n",
978 ib_event->event);
979 goto out;
980 }
981
982 ret = id_priv->id.event_handler(&id_priv->id, &event);
983 if (ret) {
984 /* Destroy the CM ID by returning a non-zero value. */
985 id_priv->cm_id.ib = NULL;

--- 459 unchanged lines hidden (view full) ---

1445 cma_attach_to_dev(dev_id_priv, cma_dev);
1446 list_add_tail(&dev_id_priv->listen_list, &id_priv->listen_list);
1447 atomic_inc(&id_priv->refcount);
1448 dev_id_priv->internal_id = 1;
1449
1450 ret = rdma_listen(id, id_priv->backlog);
1451 if (ret)
1452 printk(KERN_WARNING "RDMA CMA: cma_listen_on_dev, error %d, "
978 ib_event->event);
979 goto out;
980 }
981
982 ret = id_priv->id.event_handler(&id_priv->id, &event);
983 if (ret) {
984 /* Destroy the CM ID by returning a non-zero value. */
985 id_priv->cm_id.ib = NULL;

--- 459 unchanged lines hidden (view full) ---

1445 cma_attach_to_dev(dev_id_priv, cma_dev);
1446 list_add_tail(&dev_id_priv->listen_list, &id_priv->listen_list);
1447 atomic_inc(&id_priv->refcount);
1448 dev_id_priv->internal_id = 1;
1449
1450 ret = rdma_listen(id, id_priv->backlog);
1451 if (ret)
1452 printk(KERN_WARNING "RDMA CMA: cma_listen_on_dev, error %d, "
1453 "listening on device %s", ret, cma_dev->device->name);
1453 "listening on device %s\n", ret, cma_dev->device->name);
1454}
1455
1456static void cma_listen_on_all(struct rdma_id_private *id_priv)
1457{
1458 struct cma_device *cma_dev;
1459
1460 mutex_lock(&lock);
1461 list_add_tail(&id_priv->list, &listen_any_list);

--- 688 unchanged lines hidden (view full) ---

2150 id_priv->id.route.path_rec,
2151 &event.param.ud.ah_attr);
2152 event.param.ud.qp_num = rep->qpn;
2153 event.param.ud.qkey = rep->qkey;
2154 event.event = RDMA_CM_EVENT_ESTABLISHED;
2155 event.status = 0;
2156 break;
2157 default:
1454}
1455
1456static void cma_listen_on_all(struct rdma_id_private *id_priv)
1457{
1458 struct cma_device *cma_dev;
1459
1460 mutex_lock(&lock);
1461 list_add_tail(&id_priv->list, &listen_any_list);

--- 688 unchanged lines hidden (view full) ---

2150 id_priv->id.route.path_rec,
2151 &event.param.ud.ah_attr);
2152 event.param.ud.qp_num = rep->qpn;
2153 event.param.ud.qkey = rep->qkey;
2154 event.event = RDMA_CM_EVENT_ESTABLISHED;
2155 event.status = 0;
2156 break;
2157 default:
2158 printk(KERN_ERR "RDMA CMA: unexpected IB CM event: %d",
2158 printk(KERN_ERR "RDMA CMA: unexpected IB CM event: %d\n",
2159 ib_event->event);
2160 goto out;
2161 }
2162
2163 ret = id_priv->id.event_handler(&id_priv->id, &event);
2164 if (ret) {
2165 /* Destroy the CM ID by returning a non-zero value. */
2166 id_priv->cm_id.ib = NULL;

--- 698 unchanged lines hidden ---
2159 ib_event->event);
2160 goto out;
2161 }
2162
2163 ret = id_priv->id.event_handler(&id_priv->id, &event);
2164 if (ret) {
2165 /* Destroy the CM ID by returning a non-zero value. */
2166 id_priv->cm_id.ib = NULL;

--- 698 unchanged lines hidden ---