Skip to content

Commit e5f9cc2

Browse files
bvanasschemartinkpetersen
authored andcommitted
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>
1 parent 1d0af94 commit e5f9cc2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/ufs/core/ufshcd.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,6 +2996,15 @@ static void ufshcd_map_queues(struct Scsi_Host *shost)
29962996
}
29972997
}
29982998

2999+
/*
3000+
* The only purpose of this function is to make the SCSI core skip the memset()
3001+
* call for the private command data.
3002+
*/
3003+
static int ufshcd_init_cmd_priv(struct Scsi_Host *host, struct scsi_cmnd *cmd)
3004+
{
3005+
return 0;
3006+
}
3007+
29993008
/**
30003009
* ufshcd_queuecommand - main entry point for SCSI requests
30013010
* @host: SCSI host pointer
@@ -9182,6 +9191,7 @@ static const struct scsi_host_template ufshcd_driver_template = {
91829191
.name = UFSHCD,
91839192
.proc_name = UFSHCD,
91849193
.map_queues = ufshcd_map_queues,
9194+
.init_cmd_priv = ufshcd_init_cmd_priv,
91859195
.queuecommand = ufshcd_queuecommand,
91869196
.nr_reserved_cmds = UFSHCD_NUM_RESERVED,
91879197
.mq_poll = ufshcd_poll,

0 commit comments

Comments
 (0)