[ofa-general] [PATCH v2] IB/iSER: Release connection resources when receiving a RDMA_CM_EVENT_DEVICE_REMOVAL event

Erez Zilber erezz at voltaire.com
Mon Apr 14 03:01:51 PDT 2008


When a RDMA_CM_EVENT_DEVICE_REMOVAL event is raised, iSER should release the
connection resources.

This is necessary when the IB HCA module is unloaded while open-iscsi is still
running. Currently, iSER just initiates a BUG() call.

Signed-off-by: Erez Zilber <erezz at voltaire.com>
---
 drivers/infiniband/ulp/iser/iser_verbs.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 993f0a8..d19cfe6 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -473,11 +473,8 @@ static int iser_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *eve
 		iser_connect_error(cma_id);
 		break;
 	case RDMA_CM_EVENT_DISCONNECTED:
-		iser_disconnected_handler(cma_id);
-		break;
 	case RDMA_CM_EVENT_DEVICE_REMOVAL:
-		iser_err("Device removal is currently unsupported\n");
-		BUG();
+		iser_disconnected_handler(cma_id);
 		break;
 	default:
 		iser_err("Unexpected RDMA CM event (%d)\n", event->event);
-- 
1.5.3.6





More information about the general mailing list