aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 84d9298ed989..d5088ce78290 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -549,6 +549,13 @@ static void srp_remove_work(struct work_struct *work)
549 srp_remove_target(target); 549 srp_remove_target(target);
550} 550}
551 551
552static void srp_rport_delete(struct srp_rport *rport)
553{
554 struct srp_target_port *target = rport->lld_data;
555
556 srp_queue_remove_work(target);
557}
558
552static int srp_connect_target(struct srp_target_port *target) 559static int srp_connect_target(struct srp_target_port *target)
553{ 560{
554 int retries = 3; 561 int retries = 3;
@@ -1958,6 +1965,8 @@ static int srp_add_target(struct srp_host *host, struct srp_target_port *target)
1958 return PTR_ERR(rport); 1965 return PTR_ERR(rport);
1959 } 1966 }
1960 1967
1968 rport->lld_data = target;
1969
1961 spin_lock(&host->target_lock); 1970 spin_lock(&host->target_lock);
1962 list_add_tail(&target->list, &host->target_list); 1971 list_add_tail(&target->list, &host->target_list);
1963 spin_unlock(&host->target_lock); 1972 spin_unlock(&host->target_lock);
@@ -2524,6 +2533,7 @@ static void srp_remove_one(struct ib_device *device)
2524} 2533}
2525 2534
2526static struct srp_function_template ib_srp_transport_functions = { 2535static struct srp_function_template ib_srp_transport_functions = {
2536 .rport_delete = srp_rport_delete,
2527}; 2537};
2528 2538
2529static int __init srp_init_module(void) 2539static int __init srp_init_module(void)