]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: scsi_debug: Fix hrtimer support for ndelay
authorJohn Garry <john.g.garry@oracle.com>
Mon, 2 Dec 2024 13:00:45 +0000 (13:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:18 +0000 (20:03 +0100)
commit1e1083db623dd13d23c327669a4456b62d25a873
tree3a6c3d81c0b36e02ad357f8ea1d28562a0c404ff
parent1f5e2f1ca5875728fcf62bc1a054707444ab4960
scsi: scsi_debug: Fix hrtimer support for ndelay

[ Upstream commit 6918141d815acef056a0d10e966a027d869a922d ]

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 <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20241202130045.2335194-1-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/scsi_debug.c