diff options
author | FUJITA Tomonori <tomof@acm.org> | 2007-07-11 02:08:17 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:37:50 -0400 |
commit | 2c47f9efbedbe5749b6bb16e59bc11d6e460855f (patch) | |
tree | bfc1a2154f67c3aa45f92e586678ffc37e5f80eb /drivers/scsi/scsi_tgt_priv.h | |
parent | aebd5e476ecc8ceb53577b20f2a352ff4ceffd8d (diff) |
[SCSI] tgt: add I_T nexus support
tgt uses scsi_host as I_T nexus. This works for ibmvstgt because it
creates one scsi_host for one initiator. However, other target drivers
don't work like that.
This adds I_T nexus support, which enable one scsi_host to handle
multiple initiators. New scsi_tgt_it_nexus_create/destroy functions
are expected be called transport classes. For example, ibmvstgt
creates an initiator remote port, then the srp transport calls
tgt_it_nexus_create. tgt doesn't manages I_T nexus, instead it tells
tgtd, user-space daemon, to create a new I_T nexus.
On the receiving the response from tgtd, tgt calls
shost->transportt->it_nexus_response. transports should notify a
lld. The srp transport uses it_nexus_response callback in
srp_function_template to do that.
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/scsi/scsi_tgt_priv.h')
-rw-r--r-- | drivers/scsi/scsi_tgt_priv.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/scsi/scsi_tgt_priv.h b/drivers/scsi/scsi_tgt_priv.h index e9e6db1c417f..cb92888948f9 100644 --- a/drivers/scsi/scsi_tgt_priv.h +++ b/drivers/scsi/scsi_tgt_priv.h | |||
@@ -15,12 +15,18 @@ do { \ | |||
15 | extern void scsi_tgt_if_exit(void); | 15 | extern void scsi_tgt_if_exit(void); |
16 | extern int scsi_tgt_if_init(void); | 16 | extern int scsi_tgt_if_init(void); |
17 | 17 | ||
18 | extern int scsi_tgt_uspace_send_cmd(struct scsi_cmnd *cmd, struct scsi_lun *lun, | 18 | extern int scsi_tgt_uspace_send_cmd(struct scsi_cmnd *cmd, u64 it_nexus_id, |
19 | u64 tag); | 19 | struct scsi_lun *lun, u64 tag); |
20 | extern int scsi_tgt_uspace_send_status(struct scsi_cmnd *cmd, u64 tag); | 20 | extern int scsi_tgt_uspace_send_status(struct scsi_cmnd *cmd, u64 it_nexus_id, |
21 | extern int scsi_tgt_kspace_exec(int host_no, int result, u64 tag, | 21 | u64 tag); |
22 | unsigned long uaddr, u32 len, unsigned long sense_uaddr, | 22 | extern int scsi_tgt_kspace_exec(int host_no, u64 it_nexus_id, int result, u64 tag, |
23 | u32 sense_len, u8 rw); | 23 | unsigned long uaddr, u32 len, |
24 | extern int scsi_tgt_uspace_send_tsk_mgmt(int host_no, int function, u64 tag, | 24 | unsigned long sense_uaddr, u32 sense_len, u8 rw); |
25 | extern int scsi_tgt_uspace_send_tsk_mgmt(int host_no, u64 it_nexus_id, | ||
26 | int function, u64 tag, | ||
25 | struct scsi_lun *scsilun, void *data); | 27 | struct scsi_lun *scsilun, void *data); |
26 | extern int scsi_tgt_kspace_tsk_mgmt(int host_no, u64 mid, int result); | 28 | extern int scsi_tgt_kspace_tsk_mgmt(int host_no, u64 it_nexus_id, |
29 | u64 mid, int result); | ||
30 | extern int scsi_tgt_uspace_send_it_nexus_request(int host_no, u64 it_nexus_id, | ||
31 | int function, char *initiator); | ||
32 | extern int scsi_tgt_kspace_it_nexus_rsp(int host_no, u64 it_nexus_id, int result); | ||