please pull infiniband.git
Linus, please pull from
master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git for-linus
This tree is also available from kernel.org mirrors at:
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git for-linus
We're through the bulk of our 2.6.19 merge, but this will get some fixes for drivers and the RDMA CM:
Hoang-Nam Nguyen:
IB/ehca: Fix device registration
IB/ehca: Tweak trace message format
Krishna Kumar:
RDMA/cma: Fix leak of cm_ids in case of failures RDMA/cma: Fix device removal race RDMA/cma: Eliminate unnecessary remove_list RDMA/cma: Optimize error handling
Ralph Campbell:
IB/ipath: Fix RDMA reads
Sean Hefty:
RDMA/cma: Set status correctly on route resolution error
drivers/infiniband/core/cma.c | 47 +++++++++++++++---------- drivers/infiniband/hw/ehca/ehca_main.c | 36 ++++++++++--------- drivers/infiniband/hw/ehca/ehca_tools.h | 2 + drivers/infiniband/hw/ipath/ipath_rc.c | 59 +++++++++++++++++-------------- 4 files changed, 80 insertions(+), 64 deletions(-)
drivers/infiniband/core/cma.c +28 -19
@@ -874,23 +874,25 @@ static struct rdma_id_private *cma_new_i__u16 port;u8 ip_ver; +if (cma_get_net_info (ib_event->private_data, listen_id->ps, + &ip_ver, &port, &src, &dst)) + goto err; + id =rdma_create_id (listen_id->event_handler, listen_id->context, listen_id->ps);if (IS_ERR (id)) -return NULL ; + goto err; + +cma_save_net_info (&id->route.addr, &listen_id->route.addr, + ip_ver, port, src, dst); rt = &id->route; rt->num_paths = ib_event->param.req_rcvd.alternate_path ?2 :1 ; - rt->path_rec =kmalloc (sizeof *rt->path_rec * rt->num_paths,GFP_KERNEL ); + rt->path_rec =kmalloc (sizeof *rt->path_rec * rt->num_paths, +GFP_KERNEL );if (!rt->path_rec) - goto err; + goto destroy_id; -if (cma_get_net_info (ib_event->private_data, listen_id->ps, - &ip_ver, &port, &src, &dst)) - goto err; - -cma_save_net_info (&id->route.addr, &listen_id->route.addr, - ip_ver, port, src, dst); rt->path_rec[0 ] = *ib_event->param.req_rcvd.primary_path;if (rt->num_paths ==2 ) rt->path_rec[1 ] = *ib_event->param.req_rcvd.alternate_path;
@@ -903,8 +905,10 @@ static struct rdma_id_private *cma_new_i id_priv = container_of(id, struct rdma_id_private, id); id_priv->state =CMA_CONNECT ;return id_priv; -err: + +destroy_id:rdma_destroy_id (id); +err:return NULL ; }
@@ -932,6 +936,7 @@ static int cma_req_handler(struct ib_cm_mutex_unlock (&lock);if (ret) { ret = -ENODEV ; +cma_exch (conn_id,CMA_DESTROYING );cma_release_remove (conn_id);rdma_destroy_id (&conn_id->id); goto out;
@@ -1307,6 +1312,7 @@ static void cma_query_handler(int status work->old_state =CMA_ROUTE_QUERY ; work->new_state =CMA_ADDR_RESOLVED ; work->event.event =RDMA_CM_EVENT_ROUTE_ERROR ; + work->event.status = status; }queue_work (cma_wq, &work->work);
@@ -1862,6 +1868,11 @@ static int cma_connect_ib(struct rdma_id ret =ib_send_cm_req (id_priv->cm_id.ib, &req); out: +if (ret && !IS_ERR (id_priv->cm_id.ib)) { +ib_destroy_cm_id (id_priv->cm_id.ib); + id_priv->cm_id.ib =NULL ; + } +kfree (private_data);return ret; }
@@ -1889,10 +1900,8 @@ static int cma_connect_iw(struct rdma_id cm_id->remote_addr = *sin; ret =cma_modify_qp_rtr (&id_priv->id); -if (ret) { -iw_destroy_cm_id (cm_id); -return ret; - } +if (ret) + goto out; iw_param.ord = conn_param->initiator_depth; iw_param.ird = conn_param->responder_resources;
@@ -1904,6 +1913,10 @@ static int cma_connect_iw(struct rdma_id iw_param.qpn = conn_param->qp_num; ret =iw_cm_connect (cm_id, &iw_param); out: +if (ret && !IS_ERR (cm_id)) { +iw_destroy_cm_id (cm_id); + id_priv->cm_id.iw =NULL ; + }return ret; }
@@ -2142,12 +2155,9 @@ static int cma_remove_id_dev(struct rdmastatic void cma_process_remove (struct cma_device *cma_dev) { -struct list_head remove_list;struct rdma_id_private *id_priv;int ret; -INIT_LIST_HEAD (&remove_list); -mutex_lock (&lock);while (!list_empty (&cma_dev->id_list)) { id_priv = list_entry(cma_dev->id_list.next,
@@ -2158,8 +2168,7 @@ static void cma_process_remove(struct cmcontinue ; } -list_del (&id_priv->list); -list_add_tail (&id_priv->list, &remove_list); +list_del_init (&id_priv->list);atomic_inc (&id_priv->refcount);mutex_unlock (&lock);
drivers/infiniband/hw/ehca/ehca_main.c +19 -17
@@ -49,7 +49,7 @@ #include "hcp_if.h"MODULE_LICENSE ("Dual BSD/GPL" );MODULE_AUTHOR ("Christoph Raisch <[email protected]>" );MODULE_DESCRIPTION ("IBM eServer HCA InfiniBand Device Driver" ); -MODULE_VERSION ("SVNEHCA_0016" ); +MODULE_VERSION ("SVNEHCA_0017" );int ehca_open_aqp1 =0 ;int ehca_debug_level =0 ;
@@ -239,7 +239,7 @@ init_node_guid1:return ret; } -int ehca_register_device (struct ehca_shca *shca) +int ehca_init_device (struct ehca_shca *shca) {int ret;
@@ -317,11 +317,6 @@ int ehca_register_device(struct ehca_shc/* shca->ib_device.process_mad = ehca_process_mad; */ shca->ib_device.mmap = ehca_mmap; - ret =ib_register_device (&shca->ib_device); -if (ret) -ehca_err (&shca->ib_device, -"ib_register_device() failed ret=%x" , ret); -return ret; }
@@ -561,9 +556,9 @@ static int __devinit ehca_probe(struct i goto probe1; } - ret =ehca_register_device (shca); + ret =ehca_init_device (shca);if (ret) { -ehca_gen_err ("Cannot register Infiniband device" ); +ehca_gen_err ("Cannot init ehca device struct" ); goto probe1; }
@@ -571,7 +566,7 @@ static int __devinit ehca_probe(struct i ret =ehca_create_eq (shca, &shca->eq,EHCA_EQ ,2048 );if (ret) {ehca_err (&shca->ib_device,"Cannot create EQ." ); - goto probe2; + goto probe1; } ret =ehca_create_eq (shca, &shca->neq,EHCA_NEQ ,513 );
@@ -600,6 +595,13 @@ static int __devinit ehca_probe(struct i goto probe5; } + ret =ib_register_device (&shca->ib_device); +if (ret) { +ehca_err (&shca->ib_device, +"ib_register_device() failed ret=%x" , ret); + goto probe6; + } +/* create AQP1 for port 1 */ if (ehca_open_aqp1 ==1 ) { shca->sport[0 ].port_state =IB_PORT_DOWN ;
@@ -607,7 +609,7 @@ static int __devinit ehca_probe(struct iif (ret) {ehca_err (&shca->ib_device,"Cannot create AQP1 for port 1." ); - goto probe6; + goto probe7; } }
@@ -618,7 +620,7 @@ static int __devinit ehca_probe(struct iif (ret) {ehca_err (&shca->ib_device,"Cannot create AQP1 for port 2." ); - goto probe7; + goto probe8; } }
@@ -630,12 +632,15 @@ static int __devinit ehca_probe(struct ireturn 0 ; -probe7: +probe8: ret =ehca_destroy_aqp1 (&shca->sport[0 ]);if (ret)ehca_err (&shca->ib_device,"Cannot destroy AQP1 for port 1. ret=%x" , ret); +probe7: +ib_unregister_device (&shca->ib_device); + probe6: ret =ehca_dereg_internal_maxmr (shca);if (ret)
@@ -660,9 +665,6 @@ probe3:ehca_err (&shca->ib_device,"Cannot destroy EQ. ret=%x" , ret); -probe2: -ib_unregister_device (&shca->ib_device); - probe1:ib_dealloc_device (&shca->ib_device);
@@ -750,7 +752,7 @@ int __init ehca_module_init(void)int ret;printk (KERN_INFO "eHCA Infiniband Device Driver " -"(Rel.: SVNEHCA_0016)\n" ); +"(Rel.: SVNEHCA_0017)\n" );idr_init (&ehca_qp_idr);idr_init (&ehca_cq_idr);spin_lock_init (&ehca_qp_idr_lock);
drivers/infiniband/hw/ehca/ehca_tools.h +1 -1
@@ -117,7 +117,7 @@ #define ehca_dmp(adr, len, format, args.unsigned int l = (unsigned int )(len); \unsigned char *deb = (unsigned char *)(adr); \for (x =0 ; x < l; x +=16 ) { \ -printk ("EHCA_DMP:%s" format \ +printk ("EHCA_DMP:%s " format \" adr=%p ofs=%04x %016lx %016lx\n" , \ __FUNCTION__, ##args, deb, x, \ *((u64 *)&deb[0 ]), *((u64 *)&deb[8 ])); \
drivers/infiniband/hw/ipath/ipath_rc.c +32 -27
136 lines not on this page · raw message