scsi: ufs: mcq: Fix incorrectly set queue depth
authorAsutosh Das <quic_asutoshd@quicinc.com>
Thu, 16 Feb 2023 17:13:46 +0000 (09:13 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 21 Feb 2023 23:20:35 +0000 (18:20 -0500)
commit2076f57f2ca0a2034afac7832257b2bc509c1a87
tree891b35fabd3336dcaa7def6c84e618f0c67ff421
parent19873b03f1daeffd9d5e089b855dd926975ab5b7
scsi: ufs: mcq: Fix incorrectly set queue depth

ufshcd_config_mcq() may change the can_queue value. The current code
invokes scsi_add_host() before ufshcd_config_mcq() so the tags are
limited to the original can_queue value.

Fix this by invoking scsi_add_host() after ufshcd_config_mcq().

Link: https://lore.kernel.org/r/8840cea4a57b46dabce18acc39afc50ab826330f.1676567593.git.quic_asutoshd@quicinc.com
Fixes: 2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface")
Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c