mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
![FUJITA Tomonori](/assets/img/avatar_default.png)
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>
21 lines
807 B
C
21 lines
807 B
C
/*
|
|
* SCSI target definitions
|
|
*/
|
|
|
|
#include <linux/dma-mapping.h>
|
|
|
|
struct Scsi_Host;
|
|
struct scsi_cmnd;
|
|
struct scsi_lun;
|
|
|
|
extern struct Scsi_Host *scsi_tgt_cmd_to_host(struct scsi_cmnd *);
|
|
extern int scsi_tgt_alloc_queue(struct Scsi_Host *);
|
|
extern void scsi_tgt_free_queue(struct Scsi_Host *);
|
|
extern int scsi_tgt_queue_command(struct scsi_cmnd *, u64, struct scsi_lun *, u64);
|
|
extern int scsi_tgt_tsk_mgmt_request(struct Scsi_Host *, u64, int, u64,
|
|
struct scsi_lun *, void *);
|
|
extern struct scsi_cmnd *scsi_host_get_command(struct Scsi_Host *,
|
|
enum dma_data_direction, gfp_t);
|
|
extern void scsi_host_put_command(struct Scsi_Host *, struct scsi_cmnd *);
|
|
extern int scsi_tgt_it_nexus_create(struct Scsi_Host *, u64, char *);
|
|
extern int scsi_tgt_it_nexus_destroy(struct Scsi_Host *, u64);
|