scsi: ufs: core: Defer adding host to SCSI if MCQ is supported
authorAsutosh Das <quic_asutoshd@quicinc.com>
Fri, 13 Jan 2023 20:48:40 +0000 (12:48 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 14 Jan 2023 02:03:36 +0000 (21:03 -0500)
commit0cab4023ec7b49b18145f74ab8389678d6d58878
treefbfc78705a6b83c29a252dd4209c9f5b42cc494a
parent305a357d3595d39be7c001f72e135bc94cbd85da
scsi: ufs: core: Defer adding host to SCSI if MCQ is supported

If MCQ support is present, enabling it after MCQ support has been
configured would require reallocating tags and memory.  It would also free
up the already allocated memory in Single Doorbell Mode. So defer invoking
scsi_add_host() until MCQ is configured.

Co-developed-by: Can Guo <quic_cang@quicinc.com>
Signed-off-by: Can Guo <quic_cang@quicinc.com>
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
include/ufs/ufshcd.h