Skip to content

Commit

Permalink
scsi: ufs: core: Convert a comment into an explicit check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bvanassche authored and martinkpetersen committed Oct 25, 2024
1 parent 18ec23b commit 0936001
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/ufs/core/ufshcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -8805,8 +8805,9 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
return ret;
}
hba->scsi_host_added = true;
} else if (is_mcq_supported(hba)) {
/* UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH is set */
} else if (is_mcq_supported(hba) &&
hba->quirks &
UFSHCD_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH) {
ufshcd_config_mcq(hba);
ufshcd_mcq_enable(hba);
}
Expand Down

0 comments on commit 0936001

Please sign in to comment.