diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2025-10-31 13:39:30 -0700 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2025-11-12 17:02:33 -0500 |
| commit | e5f9cc2af9a82700e989ac08be3c85c25046a6f6 (patch) | |
| tree | 4cfc2cedf5ef780e9c26f2aea62d24a80101b3db | |
| parent | 1d0af94ffb5d4c9b99d38646521b6d3e4119d044 (diff) | |
scsi: ufs: core: Do not clear driver-private command data
Tell the SCSI core to skip the memset() call that clears driver-private
data because __ufshcd_setup_cmd() performs all necessary initialization.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251031204029.2883185-23-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| -rw-r--r-- | drivers/ufs/core/ufshcd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 20eae5d9487b..1757aa0237da 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -2996,6 +2996,15 @@ static void ufshcd_map_queues(struct Scsi_Host *shost) } } +/* + * The only purpose of this function is to make the SCSI core skip the memset() + * call for the private command data. + */ +static int ufshcd_init_cmd_priv(struct Scsi_Host *host, struct scsi_cmnd *cmd) +{ + return 0; +} + /** * ufshcd_queuecommand - main entry point for SCSI requests * @host: SCSI host pointer @@ -9182,6 +9191,7 @@ static const struct scsi_host_template ufshcd_driver_template = { .name = UFSHCD, .proc_name = UFSHCD, .map_queues = ufshcd_map_queues, + .init_cmd_priv = ufshcd_init_cmd_priv, .queuecommand = ufshcd_queuecommand, .nr_reserved_cmds = UFSHCD_NUM_RESERVED, .mq_poll = ufshcd_poll, |