block/nvme: Replace magic value by SCALE_MS definition
Use self-explicit SCALE_MS definition instead of magic value
(missed in similar commit e4f310fe7f
).
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200922083821.578519-7-philmd@redhat.com>
This commit is contained in:
parent
fad1eb6886
commit
eefffb0244
@ -772,7 +772,7 @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
|
||||
CC_EN_MASK);
|
||||
/* Wait for CSTS.RDY = 1. */
|
||||
now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
|
||||
deadline = now + timeout_ms * 1000000;
|
||||
deadline = now + timeout_ms * SCALE_MS;
|
||||
while (!NVME_CSTS_RDY(le32_to_cpu(regs->csts))) {
|
||||
if (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) > deadline) {
|
||||
error_setg(errp, "Timeout while waiting for device to start (%"
|
||||
|
Loading…
Reference in New Issue
Block a user