Commit ab9fd06
scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic
The ufshcd_add_delay_before_dme_cmd() always introduces a delay of
MIN_DELAY_BEFORE_DME_CMDS_US between DME commands even when it's not
required. The delay is added when the UFS host controller supplies the
quirk UFSHCD_QUIRK_DELAY_BEFORE_DME_CMDS.
Fix the logic to update hba->last_dme_cmd_tstamp to ensure subsequent DME
commands have the correct delay in the range of 0 to
MIN_DELAY_BEFORE_DME_CMDS_US.
Update the timestamp at the end of the function to ensure it captures the
latest time after any necessary delay has been applied.
Signed-off-by: Vamshi Gajjela <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: cad2e03 ("ufs: add support to allow non standard behaviours (quirks)")
Cc: [email protected]
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 7c632fc commit ab9fd06
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4100 | 4100 | | |
4101 | 4101 | | |
4102 | 4102 | | |
4103 | | - | |
| 4103 | + | |
4104 | 4104 | | |
4105 | 4105 | | |
4106 | | - | |
4107 | | - | |
| 4106 | + | |
| 4107 | + | |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
4108 | 4113 | | |
4109 | 4114 | | |
4110 | 4115 | | |
| |||
0 commit comments