diff options
| author | Sagi Grimberg <sagig@mellanox.com> | 2015-03-29 08:52:14 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-04-08 02:27:54 -0400 |
| commit | cf8ae95823ae99186729834a630f24ff9e7b1501 (patch) | |
| tree | b0c0ece37a1c96c4735d334328369bb35c57f418 /drivers/infiniband/ulp | |
| parent | 7748681bb8100f24571a53d42f180e9f4fe8f39f (diff) | |
iser-target: Rename device find/release routines
isert_device_find_by_ib_dev and isert_device_try_release
can have a better, more common name like isert_device_[get|put].
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband/ulp')
| -rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index f01502353ae2..d19271bb8de1 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
| @@ -410,7 +410,7 @@ isert_free_device_ib_res(struct isert_device *device) | |||
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | static void | 412 | static void |
| 413 | isert_device_try_release(struct isert_device *device) | 413 | isert_device_put(struct isert_device *device) |
| 414 | { | 414 | { |
| 415 | mutex_lock(&device_list_mutex); | 415 | mutex_lock(&device_list_mutex); |
| 416 | device->refcount--; | 416 | device->refcount--; |
| @@ -424,7 +424,7 @@ isert_device_try_release(struct isert_device *device) | |||
| 424 | } | 424 | } |
| 425 | 425 | ||
| 426 | static struct isert_device * | 426 | static struct isert_device * |
| 427 | isert_device_find_by_ib_dev(struct rdma_cm_id *cma_id) | 427 | isert_device_get(struct rdma_cm_id *cma_id) |
| 428 | { | 428 | { |
| 429 | struct isert_device *device; | 429 | struct isert_device *device; |
| 430 | int ret; | 430 | int ret; |
| @@ -713,11 +713,12 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) | |||
| 713 | goto out_req_dma_map; | 713 | goto out_req_dma_map; |
| 714 | } | 714 | } |
| 715 | 715 | ||
| 716 | device = isert_device_find_by_ib_dev(cma_id); | 716 | device = isert_device_get(cma_id); |
| 717 | if (IS_ERR(device)) { | 717 | if (IS_ERR(device)) { |
| 718 | ret = PTR_ERR(device); | 718 | ret = PTR_ERR(device); |
| 719 | goto out_rsp_dma_map; | 719 | goto out_rsp_dma_map; |
| 720 | } | 720 | } |
| 721 | isert_conn->conn_device = device; | ||
| 721 | 722 | ||
| 722 | /* Set max inflight RDMA READ requests */ | 723 | /* Set max inflight RDMA READ requests */ |
| 723 | isert_conn->initiator_depth = min_t(u8, | 724 | isert_conn->initiator_depth = min_t(u8, |
| @@ -725,8 +726,6 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) | |||
| 725 | device->dev_attr.max_qp_init_rd_atom); | 726 | device->dev_attr.max_qp_init_rd_atom); |
| 726 | isert_dbg("Using initiator_depth: %u\n", isert_conn->initiator_depth); | 727 | isert_dbg("Using initiator_depth: %u\n", isert_conn->initiator_depth); |
| 727 | 728 | ||
| 728 | isert_conn->conn_device = device; | ||
| 729 | |||
| 730 | ret = isert_conn_setup_qp(isert_conn, cma_id); | 729 | ret = isert_conn_setup_qp(isert_conn, cma_id); |
| 731 | if (ret) | 730 | if (ret) |
| 732 | goto out_conn_dev; | 731 | goto out_conn_dev; |
| @@ -748,7 +747,7 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) | |||
| 748 | return 0; | 747 | return 0; |
| 749 | 748 | ||
| 750 | out_conn_dev: | 749 | out_conn_dev: |
| 751 | isert_device_try_release(device); | 750 | isert_device_put(device); |
| 752 | out_rsp_dma_map: | 751 | out_rsp_dma_map: |
| 753 | ib_dma_unmap_single(ib_dev, isert_conn->login_rsp_dma, | 752 | ib_dma_unmap_single(ib_dev, isert_conn->login_rsp_dma, |
| 754 | ISER_RX_LOGIN_SIZE, DMA_TO_DEVICE); | 753 | ISER_RX_LOGIN_SIZE, DMA_TO_DEVICE); |
| @@ -796,7 +795,7 @@ isert_connect_release(struct isert_conn *isert_conn) | |||
| 796 | kfree(isert_conn); | 795 | kfree(isert_conn); |
| 797 | 796 | ||
| 798 | if (device) | 797 | if (device) |
| 799 | isert_device_try_release(device); | 798 | isert_device_put(device); |
| 800 | } | 799 | } |
| 801 | 800 | ||
| 802 | static void | 801 | static void |
