From 8f033f3f9d5065289d9f3617abc9fb0fa9963358 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 25 Aug 2019 22:54:15 +0000 Subject: [PATCH] scst: Backport scsi_cmd_priv() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8565 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index 5f3be247d..112c8dc98 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1586,6 +1586,14 @@ static inline int scsi_bidi_cmnd(struct scsi_cmnd *cmd) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) +/* See also commit b54197c43db8 ("virtio_scsi: use cmd_size") # v3.16. */ +static inline void *scsi_cmd_priv(struct scsi_cmnd *cmd) +{ + return cmd + 1; +} +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)