Lines Matching refs:cm_dev
159 struct cm_device *cm_dev; member
345 ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc, in cm_init_av_for_response()
351 struct cm_device *cm_dev; in cm_init_av_by_path() local
358 list_for_each_entry(cm_dev, &cm.device_list, list) { in cm_init_av_by_path()
359 if (!ib_find_cached_gid(cm_dev->ib_device, &path->sgid, in cm_init_av_by_path()
361 port = cm_dev->port[p-1]; in cm_init_av_by_path()
370 ret = ib_find_cached_pkey(cm_dev->ib_device, port->port_num, in cm_init_av_by_path()
376 ib_init_ah_from_path(cm_dev->ib_device, port->port_num, path, in cm_init_av_by_path()
1051 cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay, in cm_format_req()
1072 cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay, in cm_format_req()
1527 cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL); in cm_req_handler()
1562 ib_get_cached_gid(work->port->cm_dev->ib_device, in cm_req_handler()
1615 cm_id_priv->av.port->cm_dev->ack_delay); in cm_format_rep()
2596 cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay, in cm_format_lap()
2987 cm_id = ib_create_cm_id(work->port->cm_dev->ib_device, NULL, NULL); in cm_sidr_req_handler()
3619 static void cm_get_ack_delay(struct cm_device *cm_dev) in cm_get_ack_delay() argument
3623 if (ib_query_device(cm_dev->ib_device, &attr)) in cm_get_ack_delay()
3624 cm_dev->ack_delay = 0; /* acks will rely on packet life time */ in cm_get_ack_delay()
3626 cm_dev->ack_delay = attr.local_ca_ack_delay; in cm_get_ack_delay()
3682 &port->cm_dev->device->kobj, in cm_create_port_fs()
3720 struct cm_device *cm_dev; in cm_add_one() local
3736 cm_dev = kzalloc(sizeof(*cm_dev) + sizeof(*port) * in cm_add_one()
3738 if (!cm_dev) in cm_add_one()
3741 cm_dev->ib_device = ib_device; in cm_add_one()
3742 cm_get_ack_delay(cm_dev); in cm_add_one()
3744 cm_dev->device = device_create(&cm_class, &ib_device->dev, in cm_add_one()
3747 if (IS_ERR(cm_dev->device)) { in cm_add_one()
3748 kfree(cm_dev); in cm_add_one()
3758 cm_dev->port[i-1] = port; in cm_add_one()
3759 port->cm_dev = cm_dev; in cm_add_one()
3780 ib_set_client_data(ib_device, &cm_client, cm_dev); in cm_add_one()
3783 list_add_tail(&cm_dev->list, &cm.device_list); in cm_add_one()
3795 port = cm_dev->port[i-1]; in cm_add_one()
3800 device_unregister(cm_dev->device); in cm_add_one()
3801 kfree(cm_dev); in cm_add_one()
3806 struct cm_device *cm_dev; in cm_remove_one() local
3814 cm_dev = ib_get_client_data(ib_device, &cm_client); in cm_remove_one()
3815 if (!cm_dev) in cm_remove_one()
3819 list_del(&cm_dev->list); in cm_remove_one()
3823 port = cm_dev->port[i-1]; in cm_remove_one()
3829 device_unregister(cm_dev->device); in cm_remove_one()
3830 kfree(cm_dev); in cm_remove_one()