Fix "atascsi_passthru_done, timeout"

Turns out, the current Version of smartmontools sets the timeout in
ata.passthru to 60 instead of 60000. (Missing conversion from seconds
to milliseconds)

In Upstream commit 9c2f3a38063c4c6837507373c4dc4c9b1e3e7e81 from
2020-06-05 fixes this.

Since there were also API-Changes, i could not just import the fix.

The patch below patches just the timeout to fix our version.
When smartmontools 7.2 is released the patch should be obsolete.


Report (above), diff and tests from Martin Ziemer (maintainer), thanks!
This commit is contained in:
kn 2020-09-01 15:46:04 +00:00
parent a433b49ad0
commit 05993b0b71
2 changed files with 18 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.43 2020/02/19 17:46:52 sthen Exp $
# $OpenBSD: Makefile,v 1.44 2020/09/01 15:46:04 kn Exp $
COMMENT= control and monitor storage systems using SMART
# XXX at update time check whether C++11 is actually needed
DISTNAME= smartmontools-7.1
REVISION= 0
CATEGORIES= sysutils
HOMEPAGE= https://www.smartmontools.org/

View File

@ -0,0 +1,16 @@
$OpenBSD $
Add missing seconds to milliseconds conversion, hand picked from upstream
9c2f3a38063c4c6837507373c4dc4c9b1e3e7e81 from 05.06.2020.
--- scsiata.cpp.orig Wed Dec 5 19:30:46 2018
+++ scsiata.cpp Tue Sep 1 08:48:16 2020
@@ -364,7 +364,7 @@ bool sat_device::ata_pass_through(const ata_cmd_in & i
io_hdr.cmnd_len = passthru_size;
io_hdr.sensep = sense;
io_hdr.max_sense_len = sizeof(sense);
- io_hdr.timeout = SCSI_TIMEOUT_DEFAULT;
+ io_hdr.timeout = SCSI_TIMEOUT_DEFAULT * 1000;
scsi_device * scsidev = get_tunnel_dev();
if (!scsidev->scsi_pass_through(&io_hdr)) {