Tuesday, September 01, 2020

[bugfix patch] smartmontools 7.1 -> 7.1p0

After i bought a new drive i got no smart data from it and the message
"atascsi_passthru_done, timeout" in dmesg.

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.

Tested on the affected amd64 system.


Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/smartmontools/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile 19 Feb 2020 17:46:52 -0000 1.43
+++ Makefile 1 Sep 2020 07:14:52 -0000
@@ -4,6 +4,7 @@ COMMENT= control and monitor storage sy

# XXX at update time check whether C++11 is actually needed
DISTNAME= smartmontools-7.1
+REVISION= 0
CATEGORIES= sysutils

HOMEPAGE= https://www.smartmontools.org/
Index: patches/patch-scsiata_cpp
===================================================================
RCS file: patches/patch-scsiata_cpp
diff -N patches/patch-scsiata_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scsiata_cpp 1 Sep 2020 07:14:52 -0000
@@ -0,0 +1,11 @@
+--- 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)) {

No comments:

Post a Comment