diff options
| author | John Garry <[email protected]> | 2024-12-02 13:00:45 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2024-12-04 18:22:59 +0000 |
| commit | 6918141d815acef056a0d10e966a027d869a922d (patch) | |
| tree | a3401b6665fcb3374c5255a5f3bacc5586161e46 /drivers/scsi/scsi_debug.c | |
| parent | scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN a... (diff) | |
| download | kernel-6918141d815acef056a0d10e966a027d869a922d.tar.gz kernel-6918141d815acef056a0d10e966a027d869a922d.zip | |
scsi: scsi_debug: Fix hrtimer support for ndelay
Since commit 771f712ba5b0 ("scsi: scsi_debug: Fix cmd duration
calculation"), ns_from_boot value is only evaluated in schedule_resp()
for polled requests.
However, ns_from_boot is also required for hrtimer support for when
ndelay is less than INCLUSIVE_TIMING_MAX_NS, so fix up the logic to
decide when to evaluate ns_from_boot.
Fixes: 771f712ba5b0 ("scsi: scsi_debug: Fix cmd duration calculation")
Signed-off-by: John Garry <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
| -rw-r--r-- | drivers/scsi/scsi_debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index b52513eeeafa..680ba180a672 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -6447,7 +6447,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, } sd_dp = &sqcp->sd_dp; - if (polled) + if (polled || (ndelay > 0 && ndelay < INCLUSIVE_TIMING_MAX_NS)) ns_from_boot = ktime_get_boottime_ns(); /* one of the resp_*() response functions is called here */ |
