Your message dated Thu, 22 Feb 2018 21:20:14 +0000
with message-id <e1eoyhm-000cf9...@fasolo.debian.org>
and subject line Bug#891051: fixed in hdparm 9.54+ds-1
has caused the Debian Bug report #891051,
regarding Only enable APM on disks that advertise it
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
891051: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891051
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: hdparm
Version: 9.53+ds-1
Severity: normal
Tags: patch

hdparm tries to configure APM on every (non-USB/non-firewire) disk
in the system without first checking if APM is supported. This *should*
be OK, since hdparm fails gracefully in this case. However, sending APM
commands to disks that don't support it can have side-effects. I received a
report that this was causing bus resets on a Cavium Sabre system with the
disk below that would sometimes escalate to a boot failure.

It seems safer to just avoid sending APM command to disks when they don't
advertise support for it - see attached patch.

# hdparm -i /dev/sdj
/dev/sdj:

 Model=SDLFOCAM-800G-1HA1, FwRev=ZZ37RE92, SerialNo=0006C7CE
 Config={ NotMFM DTR>5Mbs RotSpdTol>.5% dStbOff FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1562824368
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes: pio0 pio3 pio4
 DMA modes: mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: unknown: ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

# hdparm -B 254 /dev/sdj

/dev/sdj:
 setting Advanced Power Management level to 0xfe (254)
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 53 40 fe 21 04
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 APM_level = not supported

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.15.0-rc8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hdparm depends on:
ii  libc6     2.26-6
ii  lsb-base  9.20170808

Versions of packages hdparm recommends:
ii  powermgmt-base  1.31+nmu1

Versions of packages hdparm suggests:
pn  apmd  <none>

-- no debconf information
diff -urpN hdparm-9.53+ds.orig/debian/hdparm-functions 
hdparm-9.53+ds/debian/hdparm-functions
--- hdparm-9.53+ds.orig/debian/hdparm-functions 2018-01-06 05:37:12.000000000 
-0700
+++ hdparm-9.53+ds/debian/hdparm-functions      2018-02-21 15:23:49.516224316 
-0700
@@ -56,7 +56,15 @@ hdparm_try_apm()
             return 1
             ;;
     esac
-    return 0
+
+    # Only activate APM on disks that support it.
+    if [ -z "$ID_ATA_FEATURE_SET_APM" ]; then
+        local ID_ATA_FEATURE_SET_APM="$(udevadm info -n "$1" -q property 
2>/dev/null | sed -n 's/^ID_ATA_FEATURE_SET_APM=//p')" || true
+    fi
+    if [ "$ID_ATA_FEATURE_SET_APM" = "1" ]; then
+        return 0
+    fi
+    return 1
 }
 
 # parse /etc/hdparm.conf and spit out a list of options for the specified

--- End Message ---
--- Begin Message ---
Source: hdparm
Source-Version: 9.54+ds-1

We believe that the bug you reported is fixed in the latest version of
hdparm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 891...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alexandre Mestiashvili <a...@biotec.tu-dresden.de> (supplier of updated hdparm 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 22 Feb 2018 14:51:46 +0100
Source: hdparm
Binary: hdparm hdparm-udeb
Architecture: source
Version: 9.54+ds-1
Distribution: unstable
Urgency: medium
Maintainer: Alexandre Mestiashvili <a...@biotec.tu-dresden.de>
Changed-By: Alexandre Mestiashvili <a...@biotec.tu-dresden.de>
Description:
 hdparm     - tune hard disk parameters for high performance
 hdparm-udeb - tune hard disk parameters for high performance (udeb)
Closes: 891051
Changes:
 hdparm (9.54+ds-1) unstable; urgency=medium
 .
   * New upstream version 9.54+ds
   * Refresh d/patches/quiet_security_freeze.patch
   * Update d/hdparm-funtions: Only enable APM on disks that advertise it,
     patch from dann frazier <da...@debian.org>, Closes: #891051
Checksums-Sha1:
 9612b0fe7ccf7bd9f1cb7fd5975708ef55a9fe9e 1951 hdparm_9.54+ds-1.dsc
 d514a3df187ba35eab25bb645e997860596bdd3d 99564 hdparm_9.54+ds.orig.tar.xz
 a27b0aa5dcd42502f66a6c76a0cc5754e7ff48a5 20356 hdparm_9.54+ds-1.debian.tar.xz
 d37e1ef897742e40fa93870545b74a5c0d28d057 5415 hdparm_9.54+ds-1_source.buildinfo
Checksums-Sha256:
 1de0b55b56608543442552553b6cc3f97074f08ea5956ddb836e9d5efc01fbff 1951 
hdparm_9.54+ds-1.dsc
 1c063dc32c094ca6178b16c22c162a53066a8de8c251b4536ecf3211943de547 99564 
hdparm_9.54+ds.orig.tar.xz
 f1115a5c4e6a7f998906916c46c2a5db604fca760dbac03f6b555c9cfcefb1e1 20356 
hdparm_9.54+ds-1.debian.tar.xz
 1a28e751afa641c60577c2a4064581fa959759be5791ef0eefc1e720035c118b 5415 
hdparm_9.54+ds-1_source.buildinfo
Files:
 c013a30526e16ff6188d72f378eb82fa 1951 admin optional hdparm_9.54+ds-1.dsc
 03f643f5bb6af0adfbe6092cef486fff 99564 admin optional 
hdparm_9.54+ds.orig.tar.xz
 2a2789d1a9cc49d5e6d10e925787b134 20356 admin optional 
hdparm_9.54+ds-1.debian.tar.xz
 d81bda0477a72e19c51023572744ce06 5415 admin optional 
hdparm_9.54+ds-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEECfR9vy0y7twkQ+vuG/g8XlT8hkAFAlqPMDkRHGRhbm5mQGRl
Ymlhbi5vcmcACgkQG/g8XlT8hkCr8A/5AfzDrW2r2UIvJxsOJ4euo2T1abpgv5NN
KEeDG+RBgdPGnhEhn5OlHw6dKTwHsjctrJYavSsMz4k0p4EiPlJ12pN1TaJKUH0H
TmdgIGK9+6NpEkjRe8lMyfLNMUvTV4/vPI3r4jGyCZh0EVY7zDaSVlVapIYvThCc
l+Dg64IZb2idgkXOxPwAuCV9Mg7GDdqc7tQ3haVJwxFapPK+7zFTx9ZHYKyaHnFu
y8yYW57PzLVmftFoBuZWtH9ISjOq6S+9Ry6v3U7a13Nbw/28pahsP1f1bFjyjgbe
aA9XAlYBiqQylF6FLiDqOSxLQXJ6Ix2dlYFn8FNQqEMcMtQ8PKWjgKKiaVoEb1Jn
fuVhJigtto4nbrOankWxNDUc5wV0eEspyTSirCrV3QsExCDfsbMwn0A44XVFK8Xf
nM/G5uKMYbdWXca9aKjiIWiX7IwLMyKaVjfH9ZsOYv0+LDEE83OcnVkjVXZBLlR+
cnAggSbzSuvJWrI4sIf5A8ZIgt4p+m3qOWyWmwnt7E/KwMZGYW+y22Dffj5ymVmO
huhuLINnti+TEDKbxYVe8nqr8NWUNn7IwpXJWiWzURX0LbbPhEYjdErlWmcRpQRT
zOBS/FWQsUypAN4s16NctJhF1lb9HZcEszvq2Nx9DJmx8ldiAsg71xZogsWHUNyf
l4Z5nvB3Aco=
=2Rr9
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to