aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/scsi_tgt_lib.c2
-rw-r--r--drivers/scsi/scsi_transport_srp.c12
-rw-r--r--include/scsi/scsi_host.h3
-rw-r--r--include/scsi/scsi_transport.h6
-rw-r--r--include/scsi/scsi_transport_srp.h1
5 files changed, 18 insertions, 6 deletions
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index fa79e54722db..5851c8e53e40 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -577,7 +577,7 @@ int scsi_tgt_kspace_tsk_mgmt(int host_no, u64 itn_id, u64 mid, int result)
577 goto done; 577 goto done;
578 } 578 }
579 579
580 err = shost->hostt->tsk_mgmt_response(shost, itn_id, mid, result); 580 err = shost->transportt->tsk_mgmt_response(shost, itn_id, mid, result);
581done: 581done:
582 scsi_host_put(shost); 582 scsi_host_put(shost);
583 return err; 583 return err;
diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
index 8e5b41ca181d..cdd001a6639c 100644
--- a/drivers/scsi/scsi_transport_srp.c
+++ b/drivers/scsi/scsi_transport_srp.c
@@ -280,10 +280,17 @@ void srp_remove_host(struct Scsi_Host *shost)
280} 280}
281EXPORT_SYMBOL_GPL(srp_remove_host); 281EXPORT_SYMBOL_GPL(srp_remove_host);
282 282
283static int srp_it_nexus_response(struct Scsi_Host *shost, u64 id, int result) 283static int srp_tsk_mgmt_response(struct Scsi_Host *shost, u64 nexus, u64 tm_id,
284 int result)
284{ 285{
285 struct srp_internal *i = to_srp_internal(shost->transportt); 286 struct srp_internal *i = to_srp_internal(shost->transportt);
286 return i->f->it_nexus_response(shost, id, result); 287 return i->f->tsk_mgmt_response(shost, nexus, tm_id, result);
288}
289
290static int srp_it_nexus_response(struct Scsi_Host *shost, u64 nexus, int result)
291{
292 struct srp_internal *i = to_srp_internal(shost->transportt);
293 return i->f->it_nexus_response(shost, nexus, result);
287} 294}
288 295
289/** 296/**
@@ -300,6 +307,7 @@ srp_attach_transport(struct srp_function_template *ft)
300 if (!i) 307 if (!i)
301 return NULL; 308 return NULL;
302 309
310 i->t.tsk_mgmt_response = srp_tsk_mgmt_response;
303 i->t.it_nexus_response = srp_it_nexus_response; 311 i->t.it_nexus_response = srp_it_nexus_response;
304 312
305 i->t.host_size = sizeof(struct srp_host_attrs); 313 i->t.host_size = sizeof(struct srp_host_attrs);
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 89c40c4bd5c4..88f6871badd8 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -145,9 +145,6 @@ struct scsi_host_template {
145 int (* transfer_response)(struct scsi_cmnd *, 145 int (* transfer_response)(struct scsi_cmnd *,
146 void (*done)(struct scsi_cmnd *)); 146 void (*done)(struct scsi_cmnd *));
147 147
148 /* Used as callback for the completion of task management request. */
149 int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64 mid, int result);
150
151 /* 148 /*
152 * This is an error handling strategy routine. You don't need to 149 * This is an error handling strategy routine. You don't need to
153 * define one of these if you don't want to - there is a default 150 * define one of these if you don't want to - there is a default
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index af5b3e15e64e..0dfef752f0e2 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -71,6 +71,12 @@ struct scsi_transport_template {
71 * for target drivers. 71 * for target drivers.
72 */ 72 */
73 int (* it_nexus_response)(struct Scsi_Host *, u64, int); 73 int (* it_nexus_response)(struct Scsi_Host *, u64, int);
74
75 /*
76 * Used as callback for the completion of task management
77 * request for target drivers.
78 */
79 int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
74}; 80};
75 81
76#define transport_class_to_shost(tc) \ 82#define transport_class_to_shost(tc) \
diff --git a/include/scsi/scsi_transport_srp.h b/include/scsi/scsi_transport_srp.h
index a705dbc016b3..9c60ca1c08c5 100644
--- a/include/scsi/scsi_transport_srp.h
+++ b/include/scsi/scsi_transport_srp.h
@@ -22,6 +22,7 @@ struct srp_rport {
22 22
23struct srp_function_template { 23struct srp_function_template {
24 /* for target drivers */ 24 /* for target drivers */
25 int (* tsk_mgmt_response)(struct Scsi_Host *, u64, u64, int);
25 int (* it_nexus_response)(struct Scsi_Host *, u64, int); 26 int (* it_nexus_response)(struct Scsi_Host *, u64, int);
26}; 27};
27 28