Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
scsi_tgt_lib.c File Reference
#include <linux/blkdev.h>
#include <linux/hash.h>
#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_tgt.h>
#include "scsi_tgt_priv.h"

Go to the source code of this file.

Data Structures

struct  scsi_tgt_cmd
 
struct  scsi_tgt_queuedata
 

Macros

#define TGT_HASH_ORDER   4
 
#define cmd_hashfn(tag)   hash_long((unsigned long) (tag), TGT_HASH_ORDER)
 

Functions

struct scsi_cmndscsi_host_get_command (struct Scsi_Host *shost, enum dma_data_direction data_dir, gfp_t gfp_mask)
 
 EXPORT_SYMBOL_GPL (scsi_host_get_command)
 
void scsi_host_put_command (struct Scsi_Host *shost, struct scsi_cmnd *cmd)
 
 EXPORT_SYMBOL_GPL (scsi_host_put_command)
 
int scsi_tgt_alloc_queue (struct Scsi_Host *shost)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_alloc_queue)
 
void scsi_tgt_free_queue (struct Scsi_Host *shost)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_free_queue)
 
struct Scsi_Hostscsi_tgt_cmd_to_host (struct scsi_cmnd *cmd)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_cmd_to_host)
 
int scsi_tgt_queue_command (struct scsi_cmnd *cmd, u64 itn_id, struct scsi_lun *scsilun, u64 tag)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_queue_command)
 
int scsi_tgt_kspace_exec (int host_no, u64 itn_id, int result, u64 tag, unsigned long uaddr, u32 len, unsigned long sense_uaddr, u32 sense_len, u8 rw)
 
int scsi_tgt_tsk_mgmt_request (struct Scsi_Host *shost, u64 itn_id, int function, u64 tag, struct scsi_lun *scsilun, void *data)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_tsk_mgmt_request)
 
int scsi_tgt_kspace_tsk_mgmt (int host_no, u64 itn_id, u64 mid, int result)
 
int scsi_tgt_it_nexus_create (struct Scsi_Host *shost, u64 itn_id, char *initiator)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_it_nexus_create)
 
int scsi_tgt_it_nexus_destroy (struct Scsi_Host *shost, u64 itn_id)
 
 EXPORT_SYMBOL_GPL (scsi_tgt_it_nexus_destroy)
 
int scsi_tgt_kspace_it_nexus_rsp (int host_no, u64 itn_id, int result)
 
 module_init (scsi_tgt_init)
 
 module_exit (scsi_tgt_exit)
 
 MODULE_DESCRIPTION ("SCSI target core")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define cmd_hashfn (   tag)    hash_long((unsigned long) (tag), TGT_HASH_ORDER)

Definition at line 56 of file scsi_tgt_lib.c.

#define TGT_HASH_ORDER   4

Definition at line 55 of file scsi_tgt_lib.c.

Function Documentation

EXPORT_SYMBOL_GPL ( scsi_host_get_command  )
EXPORT_SYMBOL_GPL ( scsi_host_put_command  )
EXPORT_SYMBOL_GPL ( scsi_tgt_alloc_queue  )
EXPORT_SYMBOL_GPL ( scsi_tgt_free_queue  )
EXPORT_SYMBOL_GPL ( scsi_tgt_cmd_to_host  )
EXPORT_SYMBOL_GPL ( scsi_tgt_queue_command  )
EXPORT_SYMBOL_GPL ( scsi_tgt_tsk_mgmt_request  )
EXPORT_SYMBOL_GPL ( scsi_tgt_it_nexus_create  )
EXPORT_SYMBOL_GPL ( scsi_tgt_it_nexus_destroy  )
MODULE_DESCRIPTION ( "SCSI target core )
module_exit ( scsi_tgt_exit  )
module_init ( scsi_tgt_init  )
MODULE_LICENSE ( "GPL"  )
struct scsi_cmnd* scsi_host_get_command ( struct Scsi_Host shost,
enum dma_data_direction  data_dir,
gfp_t  gfp_mask 
)
read

Definition at line 77 of file scsi_tgt_lib.c.

void scsi_host_put_command ( struct Scsi_Host shost,
struct scsi_cmnd cmd 
)

Definition at line 145 of file scsi_tgt_lib.c.

int scsi_tgt_alloc_queue ( struct Scsi_Host shost)

Definition at line 216 of file scsi_tgt_lib.c.

struct Scsi_Host* scsi_tgt_cmd_to_host ( struct scsi_cmnd cmd)
read

Definition at line 295 of file scsi_tgt_lib.c.

void scsi_tgt_free_queue ( struct Scsi_Host shost)

Definition at line 264 of file scsi_tgt_lib.c.

int scsi_tgt_it_nexus_create ( struct Scsi_Host shost,
u64  itn_id,
char initiator 
)

Definition at line 569 of file scsi_tgt_lib.c.

int scsi_tgt_it_nexus_destroy ( struct Scsi_Host shost,
u64  itn_id 
)

Definition at line 584 of file scsi_tgt_lib.c.

int scsi_tgt_kspace_exec ( int  host_no,
u64  itn_id,
int  result,
u64  tag,
unsigned long  uaddr,
u32  len,
unsigned long  sense_uaddr,
u32  sense_len,
u8  rw 
)

Definition at line 448 of file scsi_tgt_lib.c.

int scsi_tgt_kspace_it_nexus_rsp ( int  host_no,
u64  itn_id,
int  result 
)

Definition at line 598 of file scsi_tgt_lib.c.

int scsi_tgt_kspace_tsk_mgmt ( int  host_no,
u64  itn_id,
u64  mid,
int  result 
)

Definition at line 545 of file scsi_tgt_lib.c.

int scsi_tgt_queue_command ( struct scsi_cmnd cmd,
u64  itn_id,
struct scsi_lun scsilun,
u64  tag 
)

Definition at line 308 of file scsi_tgt_lib.c.

int scsi_tgt_tsk_mgmt_request ( struct Scsi_Host shost,
u64  itn_id,
int  function,
u64  tag,
struct scsi_lun scsilun,
void data 
)

Definition at line 530 of file scsi_tgt_lib.c.