Skip to content

Commit 6918141

Browse files
johnpgarrymartinkpetersen
authored andcommitted
scsi: scsi_debug: Fix hrtimer support for ndelay
Since commit 771f712 ("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: 771f712 ("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]>
1 parent b1aee7f commit 6918141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/scsi_debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6447,7 +6447,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip,
64476447
}
64486448
sd_dp = &sqcp->sd_dp;
64496449

6450-
if (polled)
6450+
if (polled || (ndelay > 0 && ndelay < INCLUSIVE_TIMING_MAX_NS))
64516451
ns_from_boot = ktime_get_boottime_ns();
64526452

64536453
/* one of the resp_*() response functions is called here */

0 commit comments

Comments
 (0)