Target/iser: Improve cm events handling
authorSagi Grimberg <sagig@mellanox.com>
Mon, 19 May 2014 14:44:24 +0000 (17:44 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 20 May 2014 18:17:40 +0000 (11:17 -0700)
commit88c4015fda6d014392f76d3b1688347950d7a12d
tree344353885fd0c7781c6483cd245724d88fa3a8f7
parent9d49f5e284e700576f3b65f1e28dea8539da6661
Target/iser: Improve cm events handling

There are 4 RDMA_CM events that all basically mean that
the user should teardown the IB connection:
- DISCONNECTED
- ADDR_CHANGE
- DEVICE_REMOVAL
- TIMEWAIT_EXIT

Only in DISCONNECTED/ADDR_CHANGE it makes sense to
call rdma_disconnect (send DREQ/DREP to our initiator).
So we keep the same teardown handler for all of them
but only indicate calling rdma_disconnect for the relevant
events.

This patch also removes redundant debug prints for each single
event.

v2 changes:
 - Call isert_disconnected_handler() for DEVICE_REMOVAL (Or + Sag)

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h