[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>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user