Skip to content
Snippets Groups Projects
Commit f4750af7 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: ufs: core: Initialize hba->reserved_slot earlier


Move the hba->reserved_slot and the host->can_queue assignments from
ufshcd_config_mcq() into ufshcd_alloc_mcq(). The advantages of this change
are as follows:

 - It becomes easier to verify that these two parameters are updated if
   hba->nutrs is updated.

 - It prevents unnecessary assignments to these two parameters. While
   ufshcd_config_mcq() is called during host reset, ufshcd_alloc_mcq() is
   not.

Cc: Can Guo <quic_cang@quicinc.com>
Reviewed-by: default avatarPeter Wang <peter.wang@mediatek.com>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240708211716.2827751-6-bvanassche@acm.org


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b53eb9a0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment