]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: ufs: core: Configure MCQ after link startup
authorBart Van Assche <bvanassche@acm.org>
Thu, 18 Dec 2025 23:07:37 +0000 (15:07 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 4 Jan 2026 20:17:53 +0000 (15:17 -0500)
commitee229e7c256ab5d7b277abf8d48a732c10571750
treeffab2773299fc68bc37d6300a1fada8d74851fac
parent9a49157deeb23581fc5c8189b486340d7343264a
scsi: ufs: core: Configure MCQ after link startup

Commit f46b9a595fa9 ("scsi: ufs: core: Allocate the SCSI host earlier")
did not only cause scsi_add_host() to be called earlier. It also swapped
the order of link startup and enabling and configuring MCQ mode. Before
that commit, the call chains for link startup and enabling MCQ were as
follows:

ufshcd_init()
  ufshcd_link_startup()
  ufshcd_add_scsi_host()
    ufshcd_mcq_enable()

Apparently this change causes link startup to fail. Fix this by configuring
MCQ after link startup has completed.

Reported-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
Fixes: f46b9a595fa9 ("scsi: ufs: core: Allocate the SCSI host earlier")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Link: https://patch.msgid.link/20251218230741.2661049-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c