Hello community,
here is the log from the commit of package hdparm
checked in at Mon Apr 30 22:52:14 CEST 2007.
--------
--- hdparm/hdparm.changes 2007-04-29 21:57:40.000000000 +0200
+++ /mounts/work_src_done/STABLE/hdparm/hdparm.changes 2007-04-30 22:45:40.040667000 +0200
@@ -1,0 +2,10 @@
+Mon Apr 30 22:45:25 CEST 2007 - ro@suse.de
+
+- update to 7.3
+ - fixed spelling of --drq-hsm-error in -h output
+ - fixed SG_IO CDB[2] bits for better SAT compliance
+ - fixed version number (v7.2 has "7.1" as version, doh!)
+ - added #ifdef around use of BLKGETSIZE64
+ - manpage updated
+
+-------------------------------------------------------------------
Old:
----
hdparm-7.2.tar.bz2
New:
----
hdparm-7.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hdparm.spec ++++++
--- /var/tmp/diff_new_pack.a19072/_old 2007-04-30 22:51:13.000000000 +0200
+++ /var/tmp/diff_new_pack.a19072/_new 2007-04-30 22:51:13.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package hdparm (Version 7.2)
+# spec file for package hdparm (Version 7.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -16,7 +16,7 @@
PreReq: %insserv_prereq %fillup_prereq coreutils
Provides: base:/sbin/hdparm
Autoreqprov: on
-Version: 7.2
+Version: 7.3
Release: 1
Summary: A Program to Get and Set Hard Disk Parameters
Source: hdparm-%{version}.tar.bz2
@@ -102,6 +102,13 @@
/var/adm/fillup-templates/sysconfig.ide
%changelog
+* Mon Apr 30 2007 - ro@suse.de
+- update to 7.3
+ - fixed spelling of --drq-hsm-error in -h output
+ - fixed SG_IO CDB[2] bits for better SAT compliance
+ - fixed version number (v7.2 has "7.1" as version, doh!)
+ - added #ifdef around use of BLKGETSIZE64
+ - manpage updated
* Sun Apr 29 2007 - ro@suse.de
- update to 7.2
- tweak -C
++++++ hdparm-7.2.tar.bz2 -> hdparm-7.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.2/Changelog new/hdparm-7.3/Changelog
--- old/hdparm-7.2/Changelog 2007-04-29 20:36:22.000000000 +0200
+++ new/hdparm-7.3/Changelog 2007-04-30 19:25:30.000000000 +0200
@@ -1,3 +1,9 @@
+hdparm-7.3
+ - fixed spelling of --drq-hsm-error in -h output
+ - fixed SG_IO CDB[2] bits for better SAT compliance
+ - fixed version number (v7.2 has "7.1" as version, doh!)
+ - added #ifdef around use of BLKGETSIZE64
+ - manpage updated
hdparm-7.2
- tweak -C
- added more debug info from --verbose
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.2/hdparm.8 new/hdparm-7.3/hdparm.8
--- old/hdparm-7.2/hdparm.8 2007-04-28 23:28:38.000000000 +0200
+++ new/hdparm-7.3/hdparm.8 2007-04-30 19:29:53.000000000 +0200
@@ -1,4 +1,4 @@
-.TH HDPARM 8 "April 2007" "Version 7.1"
+.TH HDPARM 8 "April 2007" "Version 7.3"
.SH NAME
hdparm \- get/set hard disk parameters
@@ -8,9 +8,9 @@
.SH DESCRIPTION
.BI hdparm
provides a command line interface to various hard disk ioctls
-supported by the stock Linux ATA/IDE device driver subsystem.
+supported by the Linux SATA/PATA/SAS "libata" subsystem
+and the older IDE driver subsystem.
Some options may work correctly only with the latest kernels.
-For best results, compile hdparm with the include files from the latest kernel source code.
.SH OPTIONS
When no flags are given,
.I -acdgkmur
@@ -100,6 +100,16 @@
much faster than the usual page cache method, giving a better indication
of raw device and driver performance.
.TP
+.I --drq-hsm-error
+VERY DANGEROUS, DON'T EVEN THINK ABOUT USING IT.
+This flag causes hdparm to issue an IDENTIFY command
+to the kernel, but incorrectly marked as a "non-data" command.
+This results in the drive being left with its DataReQust(DRQ) line
+"stuck" high. This confuses the kernel drivers, and may crash the system
+immediately with massive data loss. The option exists to help in testing
+and fortifying the kernel against similar real-world drive malfunctions.
+VERY DANGEROUS, DO NOT USE!!
+.TP
.I -D
Enable/disable the on-drive defect management feature,
whereby the drive firmware tries to automatically manage
@@ -606,7 +616,7 @@
Parts by Benjamin Benz and others.
.SH SEE ALSO
.B http://www.t13.org/
-Technical Committee T13 ATA Attachment.
+Technical Committee T13 AT Attachment (ATA) Interface.
.PP
.B http://www.serialata.org/
Serial ATA International Organization.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.2/hdparm.c new/hdparm-7.3/hdparm.c
--- old/hdparm-7.2/hdparm.c 2007-04-29 20:11:38.000000000 +0200
+++ new/hdparm-7.3/hdparm.c 2007-04-30 19:23:03.000000000 +0200
@@ -24,7 +24,7 @@
extern const char *minor_str[];
-#define VERSION "v7.1"
+#define VERSION "v7.3"
#ifndef O_DIRECT
#define O_DIRECT 040000 /* direct disk access, not easily obtained from headers */
@@ -396,10 +396,12 @@
int rc;
unsigned int blksize32 = 0;
+#ifdef BLKGETSIZE64
if (0 == ioctl(fd, BLKGETSIZE64, blksize64)) { // returns bytes
*blksize64 /= 512;
return 0;
}
+#endif
rc = ioctl(fd, BLKGETSIZE, &blksize32); // returns sectors
if (rc)
perror(" BLKGETSIZE failed");
@@ -1363,7 +1365,7 @@
" --Istdout write identify data to stdout as ASCII hex\n"
" --verbose display extra diagnostics from some commands\n"
" --security-help display help for ATA security commands\n"
- " --drq_hsm_error crash system with a \"stuck DRQ\" error (VERY DANGEROUS)\n"
+ " --drq-hsm-error crash system with a \"stuck DRQ\" error (VERY DANGEROUS)\n"
"\n");
exit(rc);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.2/hdparm.lsm new/hdparm-7.3/hdparm.lsm
--- old/hdparm-7.2/hdparm.lsm 2007-04-29 20:36:35.000000000 +0200
+++ new/hdparm-7.3/hdparm.lsm 2007-04-30 19:32:10.000000000 +0200
@@ -1,8 +1,9 @@
Begin4
Title: hdparm
-Version: 7.2
-Entered-date: 2007-04-29
+Version: 7.3
+Entered-date: 2007-04-30
Description: hdparm - get/set hard disk parameters for Linux IDE drives.
+ v7.3 fixed version number; much better SAT compliance
v7.2 fixed breakage when used with old IDE driver
v7.1 big-endian fixes for -I, --Istdin, --Istdout
v7.0 major overhaul, proper SATA support, new features and tweaks
@@ -58,7 +59,7 @@
Maintained-by: mlord@pobox.com (Mark Lord)
Primary-site: http://sourceforge.net/projects/hdparm/
Alternate-site: http://www.ibiblio.org/pub/Linux/system/hardware
- 60K hdparm-7.1.tar.gz
+ 61K hdparm-7.3.tar.gz
1K hdparm.lsm
Platforms: Linux, kernels 2.2 through 2.6
Copying-policy: BSD License
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.2/sgio.c new/hdparm-7.3/sgio.c
--- old/hdparm-7.2/sgio.c 2007-04-29 20:33:08.000000000 +0200
+++ new/hdparm-7.3/sgio.c 2007-04-29 23:48:50.000000000 +0200
@@ -99,17 +99,37 @@
return lba64;
}
-static int bad_sense (unsigned char *sb, int len)
+static void dump_bytes (const char *prefix, unsigned char *p, int len)
{
int i;
- fprintf(stderr, "SG_IO: bad/missing ATA_16 sense data:");
+ if (prefix)
+ fprintf(stderr, "%s: ", prefix);
for (i = 0; i < len; ++i)
- fprintf(stderr, " %02x", sb[i]);
+ fprintf(stderr, " %02x", p[i]);
fprintf(stderr, "\n");
+}
+
+static int bad_sense (unsigned char *sb, int len)
+{
+ dump_bytes("SG_IO: bad/missing ATA_16 sense data:", sb, len);
return EIO;
}
+enum {
+ SG_CDB2_TLEN_NODATA = 0 << 0,
+ SG_CDB2_TLEN_FEAT = 1 << 0,
+ SG_CDB2_TLEN_NSECT = 2 << 0,
+
+ SG_CDB2_TLEN_BYTES = 0 << 2,
+ SG_CDB2_TLEN_SECTORS = 1 << 2,
+
+ SG_CDB2_TDIR_TO_DEV = 0 << 3,
+ SG_CDB2_TDIR_FROM_DEV = 1 << 3,
+
+ SG_CDB2_CHECK_COND = 1 << 5,
+};
+
int sg16 (int fd, int rw, struct ata_tf *tf,
void *data, unsigned int data_bytes, unsigned int timeout_secs)
{
@@ -120,7 +140,11 @@
memset(&cdb, 0, sizeof(cdb));
cdb[ 0] = SG_ATA_16;
cdb[ 1] = data ? (rw ? SG_ATA_PROTO_PIO_OUT : SG_ATA_PROTO_PIO_IN) : SG_ATA_PROTO_NON_DATA;
- cdb[ 2] = 0x20; /* to request sense data on completion */
+ cdb[ 2] = SG_CDB2_CHECK_COND;
+ if (data) {
+ cdb[2] |= SG_CDB2_TLEN_NSECT | SG_CDB2_TLEN_SECTORS;
+ cdb[2] |= rw ? SG_CDB2_TDIR_TO_DEV : SG_CDB2_TDIR_FROM_DEV;
+ }
cdb[ 4] = tf->lob.feat;
cdb[ 6] = tf->lob.nsect;
cdb[ 8] = tf->lob.lbal;
@@ -149,6 +173,8 @@
io_hdr.pack_id = tf_to_lba(tf);
io_hdr.timeout = (timeout_secs ? timeout_secs : 5) * 1000; /* msecs */
+ if (verbose)
+ dump_bytes("outgoing cdb", cdb, sizeof(cdb));
if (ioctl(fd, SG_IO, &io_hdr) == -1) {
if (verbose)
perror("ioctl(fd,SG_IO)");
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org