main.c (95579e785a9ae7d98c199b38c4b79b64a31d90fa) | main.c (4a6dc8552ab2f670fdff317a5ac1bc42f85a8772) |
---|---|
1/* 2 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 6403 unchanged lines hidden (view full) --- 6412 int stage) 6413{ 6414 /* Number of stages to cleanup */ 6415 while (stage) { 6416 stage--; 6417 if (profile->stage[stage].cleanup) 6418 profile->stage[stage].cleanup(dev); 6419 } | 1/* 2 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 6403 unchanged lines hidden (view full) --- 6412 int stage) 6413{ 6414 /* Number of stages to cleanup */ 6415 while (stage) { 6416 stage--; 6417 if (profile->stage[stage].cleanup) 6418 profile->stage[stage].cleanup(dev); 6419 } |
6420 6421 ib_dealloc_device(&dev->ib_dev); |
|
6420} 6421 6422void *__mlx5_ib_add(struct mlx5_ib_dev *dev, 6423 const struct mlx5_ib_profile *profile) 6424{ 6425 int err; 6426 int i; 6427 --- 206 unchanged lines hidden (view full) --- 6634 mlx5_ib_unbind_slave_port(mpi->ibdev, mpi); 6635 list_del(&mpi->list); 6636 mutex_unlock(&mlx5_ib_multiport_mutex); 6637 return; 6638 } 6639 6640 dev = context; 6641 __mlx5_ib_remove(dev, dev->profile, MLX5_IB_STAGE_MAX); | 6422} 6423 6424void *__mlx5_ib_add(struct mlx5_ib_dev *dev, 6425 const struct mlx5_ib_profile *profile) 6426{ 6427 int err; 6428 int i; 6429 --- 206 unchanged lines hidden (view full) --- 6636 mlx5_ib_unbind_slave_port(mpi->ibdev, mpi); 6637 list_del(&mpi->list); 6638 mutex_unlock(&mlx5_ib_multiport_mutex); 6639 return; 6640 } 6641 6642 dev = context; 6643 __mlx5_ib_remove(dev, dev->profile, MLX5_IB_STAGE_MAX); |
6642 6643 ib_dealloc_device((struct ib_device *)dev); | |
6644} 6645 6646static struct mlx5_interface mlx5_ib_interface = { 6647 .add = mlx5_ib_add, 6648 .remove = mlx5_ib_remove, 6649 .protocol = MLX5_INTERFACE_PROTOCOL_IB, 6650}; 6651 --- 44 unchanged lines hidden --- | 6644} 6645 6646static struct mlx5_interface mlx5_ib_interface = { 6647 .add = mlx5_ib_add, 6648 .remove = mlx5_ib_remove, 6649 .protocol = MLX5_INTERFACE_PROTOCOL_IB, 6650}; 6651 --- 44 unchanged lines hidden --- |