Linux Kernel
3.7.1
|
#include <linux/dma-mapping.h>
#include <linux/blkdev.h>
#include <linux/list.h>
#include <linux/types.h>
#include <linux/timer.h>
#include <linux/scatterlist.h>
Go to the source code of this file.
Data Structures | |
struct | scsi_data_buffer |
struct | scsi_pointer |
struct | scsi_cmnd |
Macros | |
#define | MAX_COMMAND_SIZE 16 |
#define | SCSI_SENSE_BUFFERSIZE 96 |
#define | scsi_for_each_sg(cmd, sg, nseg, __i) for_each_sg(scsi_sglist(cmd), sg, nseg, __i) |
#define | scsi_for_each_prot_sg(cmd, sg, nseg, __i) for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i) |
Functions | |
struct scsi_cmnd * | scsi_get_command (struct scsi_device *, gfp_t) |
struct scsi_cmnd * | __scsi_get_command (struct Scsi_Host *, gfp_t) |
void | scsi_put_command (struct scsi_cmnd *) |
void | __scsi_put_command (struct Scsi_Host *, struct scsi_cmnd *, struct device *) |
void | scsi_finish_command (struct scsi_cmnd *cmd) |
void * | scsi_kmap_atomic_sg (struct scatterlist *sg, int sg_count, size_t *offset, size_t *len) |
void | scsi_kunmap_atomic_sg (void *virt) |
int | scsi_init_io (struct scsi_cmnd *cmd, gfp_t gfp_mask) |
void | scsi_release_buffers (struct scsi_cmnd *cmd) |
int | scsi_dma_map (struct scsi_cmnd *cmd) |
void | scsi_dma_unmap (struct scsi_cmnd *cmd) |
struct scsi_cmnd * | scsi_allocate_command (gfp_t gfp_mask) |
void | scsi_free_command (gfp_t gfp_mask, struct scsi_cmnd *cmd) |
#define MAX_COMMAND_SIZE 16 |
Definition at line 27 of file scsi_cmnd.h.
#define scsi_for_each_prot_sg | ( | cmd, | |
sg, | |||
nseg, | |||
__i | |||
) | for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i) |
Definition at line 294 of file scsi_cmnd.h.
#define scsi_for_each_sg | ( | cmd, | |
sg, | |||
nseg, | |||
__i | |||
) | for_each_sg(scsi_sglist(cmd), sg, nseg, __i) |
Definition at line 186 of file scsi_cmnd.h.
#define SCSI_SENSE_BUFFERSIZE 96 |
Definition at line 106 of file scsi_cmnd.h.
enum scsi_prot_operations |
SCSI_PROT_NORMAL | |
SCSI_PROT_READ_INSERT | |
SCSI_PROT_WRITE_STRIP | |
SCSI_PROT_READ_STRIP | |
SCSI_PROT_WRITE_INSERT | |
SCSI_PROT_READ_PASS | |
SCSI_PROT_WRITE_PASS |
Definition at line 224 of file scsi_cmnd.h.
Definition at line 257 of file scsi_cmnd.h.
scsi_allocate_command - get a fully allocated SCSI command : allocation mask
This function is for use outside of the normal host based pools. It allocates the relevant command and takes an additional reference on the pool it used. This function must be paired with scsi_free_command which also has the identical mask, otherwise the free pool counts will eventually go wrong and you'll trigger a bug.
This function should only be used by drivers that need a static command allocation at start of day for internal functions.
scsi_dma_map - perform DMA mapping against command's sg lists : scsi command
Returns the number of sg lists actually used, zero if the sg lists is NULL, or -ENOMEM if the mapping failed.
Definition at line 22 of file scsi_lib_dma.c.
scsi_dma_unmap - unmap command's sg lists mapped by scsi_dma_map : scsi command
Definition at line 42 of file scsi_lib_dma.c.
scsi_free_command - free a command allocated by scsi_allocate_command : mask used in the original allocation : command to free
Note: using the original allocation mask is vital because that's what determines which command pool we use to free the command. Any mismatch will cause the system to BUG eventually.
|
read |
Definition at line 1045 of file scsi_lib.c.
scsi_kmap_atomic_sg - find and atomically map an sg-elemnt : scatter-gather list : number of segments in sg : offset in bytes into sg, on return offset into the mapped area : bytes to map, on return number of bytes mapped
Returns virtual address of the start of the mapped page
Definition at line 2570 of file scsi_lib.c.
scsi_kunmap_atomic_sg - atomically unmap a virtual address, previously mapped with scsi_kmap_atomic_sg : virtual address to be unmapped
Definition at line 2615 of file scsi_lib.c.
Definition at line 693 of file scsi_lib.c.