Skip to content

Commit 0936001

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: core: Convert a comment into an explicit check
The comment /* UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH is set */ is only correct if ufshcd_device_init() is only called by ufshcd_probe_hba(). Convert the comment into an explicit check. This patch prepares for moving the ufshcd_device_init() calls. Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 18ec23b commit 0936001

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8805,8 +8805,9 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
88058805
return ret;
88068806
}
88078807
hba->scsi_host_added = true;
8808-
} else if (is_mcq_supported(hba)) {
8809-
/* UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH is set */
8808+
} else if (is_mcq_supported(hba) &&
8809+
hba->quirks &
8810+
UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH) {
88108811
ufshcd_config_mcq(hba);
88118812
ufshcd_mcq_enable(hba);
88128813
}

0 commit comments

Comments
 (0)