Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241016201249.2256266-6-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
09360013 18ec23b6

+3 -2
+3 -2
drivers/ufs/core/ufshcd.c
··· 8805 8805 return ret; 8806 8806 } 8807 8807 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) { 8810 8811 ufshcd_config_mcq(hba); 8811 8812 ufshcd_mcq_enable(hba); 8812 8813 }