diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-03-13 17:19:36 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 19:18:57 +0200 |
commit | 1c353f7d616a4ef04b5e73fe7a2184baa039f06f (patch) | |
tree | a5401c83e6cad369d72abcbd06ad55620346d242 /include/scsi | |
parent | [SCSI] consolidate command allocation in a single place (diff) | |
download | linux-1c353f7d616a4ef04b5e73fe7a2184baa039f06f.tar.xz linux-1c353f7d616a4ef04b5e73fe7a2184baa039f06f.zip |
[SCSI] export command allocation and freeing functions independently of the host
This is needed by things like USB storage that want to set up static
commands for later use at start of day.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index b260be6d0d73..8d20e60a94b7 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -130,6 +130,9 @@ extern void scsi_release_buffers(struct scsi_cmnd *cmd); extern int scsi_dma_map(struct scsi_cmnd *cmd); extern 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); + static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd) { return cmd->sdb.table.nents; |