[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.3 60/87] hw/scsi/scsi-generic: Fix io_timeout property not a
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.3 60/87] hw/scsi/scsi-generic: Fix io_timeout property not applying |
Date: |
Wed, 10 Apr 2024 10:22:33 +0300 |
From: Lorenz Brun <lorenz@brun.one>
The io_timeout property, introduced in c9b6609 (part of 6.0) is
silently overwritten by the hardcoded default value of 30 seconds
(DEFAULT_IO_TIMEOUT) in scsi_generic_realize because that function is
being called after the properties have already been applied.
The property definition already has a default value which is applied
correctly when no value is explicitly set, so we can just remove the
code which overrides the io_timeout completely.
This has been tested by stracing SG_IO operations with the io_timeout
property set and unset and now sets the timeout field in the ioctl
request to the proper value.
Fixes: c9b6609b69facad ("scsi: make io_timeout configurable")
Signed-off-by: Lorenz Brun <lorenz@brun.one>
Message-ID: <20240315145831.2531695-1-lorenz@brun.one>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 7c7a9f578e4fb1adff7ac8d9acaaaedb87474e76)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index 2417f0ad84..1bf7e2dfa4 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -766,7 +766,6 @@ static void scsi_generic_realize(SCSIDevice *s, Error
**errp)
/* Only used by scsi-block, but initialize it nevertheless to be clean. */
s->default_scsi_version = -1;
- s->io_timeout = DEFAULT_IO_TIMEOUT;
scsi_generic_read_device_inquiry(s);
}
--
2.39.2
- [Stable-8.2.3 51/87] docs/conf.py: Remove usage of distutils, (continued)
- [Stable-8.2.3 51/87] docs/conf.py: Remove usage of distutils, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 52/87] target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int', Michael Tokarev, 2024/04/10
- [Stable-8.2.3 54/87] vdpa-dev: Fix initialisation order to restore VDUSE compatibility, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 53/87] target/s390x: Use mutable temporary value for op_ts, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 56/87] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 55/87] block/io: accept NULL qiov in bdrv_pad_request, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 57/87] block-backend: fix edge case in bdrv_next_cleanup() where BDS associated to BB changes, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 59/87] target/i386/tcg: Enable page walking from MMIO memory, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 61/87] monitor/hmp-cmds-target: Append a space in error message in gpa2hva(), Michael Tokarev, 2024/04/10
- [Stable-8.2.3 58/87] iotests: add test for stream job with an unaligned prefetch read, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 60/87] hw/scsi/scsi-generic: Fix io_timeout property not applying,
Michael Tokarev <=
- [Stable-8.2.3 63/87] trans_rvv.c.inc: set vstart = 0 in int scalar move insns, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 62/87] target/riscv/vector_helper.c: set vstart = 0 in GEN_VEXT_VSLIDEUP_VX(), Michael Tokarev, 2024/04/10
- [Stable-8.2.3 65/87] target/riscv: always clear vstart in whole vec move insns, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 66/87] target/riscv/vector_helpers: do early exit when vstart >= vl, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 64/87] target/riscv/vector_helper.c: fix 'vmvr_v' memcpy endianess, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 67/87] target/riscv/vector_helper.c: optimize loops in ldst helpers, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 68/87] hw/intc: Update APLIC IDC after claiming iforce register, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 69/87] target/riscv: rvv: Remove the dependency of Zvfbfmin to Zfbfmin, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 70/87] target/riscv: Fix mode in riscv_tlb_fill, Michael Tokarev, 2024/04/10
- [Stable-8.2.3 72/87] virtio-net: Fix vhost virtqueue notifiers for RSS, Michael Tokarev, 2024/04/10