aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/iser/iser_initiator.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@voltaire.com>2010-02-08 13:18:39 +0000
committerRoland Dreier <rolandd@cisco.com>2010-02-24 09:41:11 -0800
commit704315f082d473b34047817f0a6a01924f38501e (patch)
treec32c2a8e5470679b42d8aa3fae86c56bc9bc8f4c /drivers/infiniband/ulp/iser/iser_initiator.c
parentbcc60c381d857ced653e912cbe6121294773e147 (diff)
downloadkernel_samsung_smdk4412-704315f082d473b34047817f0a6a01924f38501e.zip
kernel_samsung_smdk4412-704315f082d473b34047817f0a6a01924f38501e.tar.gz
kernel_samsung_smdk4412-704315f082d473b34047817f0a6a01924f38501e.tar.bz2
IB/iser: Remove atomic counter for posted receive buffers
Now that both the posting and reaping of receive buffers is done in the completion path, the counter of outstanding buffers not be atomic. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_initiator.c')
-rw-r--r--drivers/infiniband/ulp/iser/iser_initiator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
index 6d9bbe6..3e65a43 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -268,7 +268,7 @@ int iser_conn_set_full_featured_mode(struct iscsi_conn *conn)
/* Check that there is no posted recv or send buffers left - */
/* they must be consumed during the login phase */
- BUG_ON(atomic_read(&iser_conn->ib_conn->post_recv_buf_count) != 0);
+ BUG_ON(iser_conn->ib_conn->post_recv_buf_count != 0);
BUG_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0);
if (iser_alloc_rx_descriptors(iser_conn->ib_conn))
@@ -569,12 +569,12 @@ void iser_rcv_completion(struct iser_rx_desc *rx_desc,
* task eliminates the need to worry on tasks which are completed in *
* parallel to the execution of iser_conn_term. So the code that waits *
* for the posted rx bufs refcount to become zero handles everything */
- atomic_dec(&conn->ib_conn->post_recv_buf_count);
+ conn->ib_conn->post_recv_buf_count--;
if (rx_dma == ib_conn->login_dma)
return;
- outstanding = atomic_read(&ib_conn->post_recv_buf_count);
+ outstanding = ib_conn->post_recv_buf_count;
if (outstanding + ISER_MIN_POSTED_RX <= ISER_QP_MAX_RECV_DTOS) {
count = min(ISER_QP_MAX_RECV_DTOS - outstanding,
ISER_MIN_POSTED_RX);