aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFUJITA Tomonori <tomof@acm.org>2007-07-11 02:08:22 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:38:01 -0400
commitbfb743740e1598d3030c4972a8808f2bb5b95b6b (patch)
tree107bb8f17faa3f90bafc64dd6581bbf751ee30c9 /drivers
parent17b0bcfad795913b1f2a3926cd238fa2ad5522a2 (diff)
[SCSI] tgt: move tsk_mgmt_response callback to transport class
This moves tsk_mgmt_response callback in struct scsi_host_template to struct scsi_transport_template since struct scsi_transport_template is more suitable for the task management stuff. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_tgt_lib.c2
-rw-r--r--drivers/scsi/scsi_transport_srp.c12
2 files changed, 11 insertions, 3 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);