diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-02-18 20:51:02 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-23 03:11:06 +0100 |
commit | 57cbd78e61cf15269f4149669b51b94028263dc1 (patch) | |
tree | 3dee57ffc1c60d41f736e343bc3ccf19dc6941df /drivers/scsi/mesh.h | |
parent | scsi: megasas: Stop using the SCSI pointer (diff) | |
download | linux-57cbd78e61cf15269f4149669b51b94028263dc1.tar.xz linux-57cbd78e61cf15269f4149669b51b94028263dc1.zip |
scsi: mesh: Move the SCSI pointer to private command data
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-35-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/mesh.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/mesh.h b/drivers/scsi/mesh.h index ee53c05ace95..1afa8b37295b 100644 --- a/drivers/scsi/mesh.h +++ b/drivers/scsi/mesh.h @@ -8,6 +8,17 @@ #ifndef _MESH_H #define _MESH_H +struct mesh_cmd_priv { + struct scsi_pointer scsi_pointer; +}; + +static inline struct scsi_pointer *mesh_scsi_pointer(struct scsi_cmnd *cmd) +{ + struct mesh_cmd_priv *mcmd = scsi_cmd_priv(cmd); + + return &mcmd->scsi_pointer; +} + /* * Registers in the MESH controller. */ |