summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_host.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2020-01-22 19:56:34 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2020-02-28 21:02:10 -0500
commit65ca846a53149a1a72cd8d02e7b2e73dd545b834 (patch)
treed2e9861db4c83b97138fc43bb18c92ba9e1a14b0 /include/scsi/scsi_host.h
parentc5a9707672fe22865d90fc04ac2fbc4f812666f3 (diff)
downloadlinux-rt-65ca846a53149a1a72cd8d02e7b2e73dd545b834.tar.gz
scsi: core: Introduce {init,exit}_cmd_priv()
The current behavior of the SCSI core is to clear driver-private data before preparing a request for submission to the SCSI LLD. Make it possible for SCSI LLDs to disable clearing of driver-private data. These hooks will be used by a later patch, namely "scsi: ufs: Let the SCSI core allocate per-command UFS data". Link: https://lore.kernel.org/r/20200123035637.21848-2-bvanassche@acm.org Cc: Tomas Winkler <tomas.winkler@intel.com> Cc: Stanley Chu <stanley.chu@mediatek.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Avri Altman <avri.altman@wdc.com> Cc: Can Guo <cang@codeaurora.org> Cc: Ming Lei <ming.lei@redhat.com> Cc: Johannes Thumshirn <jth@kernel.org> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r--include/scsi/scsi_host.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 74dc7d4f2a96..7464394e7d01 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -62,6 +62,9 @@ struct scsi_host_template {
void __user *arg);
#endif
+ int (*init_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
+ int (*exit_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
+
/*
* The queuecommand function is used to queue up a scsi
* command block to the LLDD. When the driver finished