Hello community,
here is the log from the commit of package hdparm
checked in at Fri Jun 1 09:28:59 CEST 2007.
--------
--- hdparm/hdparm.changes 2007-05-24 11:55:17.000000000 +0200
+++ /mounts/work_src_done/STABLE/hdparm/hdparm.changes 2007-06-01 01:10:35.086070000 +0200
@@ -1,0 +2,7 @@
+Fri Jun 1 01:10:15 CEST 2007 - ro@suse.de
+
+- update to 7.4
+ - ignore ENOTTY response from DRIVE_CMD(NULL)
+ - decode CFA advanced timing information
+
+-------------------------------------------------------------------
Old:
----
hdparm-7.3.tar.bz2
New:
----
hdparm-7.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hdparm.spec ++++++
--- /var/tmp/diff_new_pack.v16071/_old 2007-06-01 09:28:09.000000000 +0200
+++ /var/tmp/diff_new_pack.v16071/_new 2007-06-01 09:28:09.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package hdparm (Version 7.3)
+# spec file for package hdparm (Version 7.4)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -16,8 +16,8 @@
PreReq: %insserv_prereq %fillup_prereq coreutils
Provides: base:/sbin/hdparm
Autoreqprov: on
-Version: 7.3
-Release: 9
+Version: 7.4
+Release: 1
Summary: A Program to Get and Set Hard Disk Parameters
Source: hdparm-%{version}.tar.bz2
Source1: 56-idedma.rules
@@ -114,6 +114,10 @@
/var/adm/fillup-templates/sysconfig.ide
%changelog
+* Fri Jun 01 2007 - ro@suse.de
+- update to 7.4
+ - ignore ENOTTY response from DRIVE_CMD(NULL)
+ - decode CFA advanced timing information
* Thu May 24 2007 - schwab@suse.de
- fix_standby is x86-only.
* Wed May 16 2007 - ro@suse.de
++++++ hdparm-5.8-silence.patch ++++++
--- /var/tmp/diff_new_pack.v16071/_old 2007-06-01 09:28:09.000000000 +0200
+++ /var/tmp/diff_new_pack.v16071/_new 2007-06-01 09:28:09.000000000 +0200
@@ -1,16 +1,17 @@
--- hdparm.c
+++ hdparm.c
-@@ -269,10 +269,9 @@
+@@ -273,11 +273,10 @@
void flush_buffer_cache (int fd)
{
fsync (fd); /* flush buffers */
- if (ioctl(fd, BLKFLSBUF, NULL)) /* do it again, big time */
- perror("BLKFLSBUF failed");
-- if (do_drive_cmd(fd, NULL) && errno != EINVAL) /* await completion */
++ ioctl(fd, BLKFLSBUF, NULL);
+ /* await completion */
+- if (do_drive_cmd(fd, NULL) && errno != EINVAL && errno != ENOTTY && errno != ENOIOCTLCMD)
- perror("HDIO_DRIVE_CMD(null) (wait for flush complete) failed");
-+ ioctl(fd, BLKFLSBUF, NULL); /* do it again, big time */
+ if (errno != EINVAL && errno != EOPNOTSUPP)
-+ do_drive_cmd(fd, NULL); /* await completion */
++ do_drive_cmd(fd, NULL);
}
int seek_to_zero (int fd)
++++++ hdparm-7.3.tar.bz2 -> hdparm-7.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/Changelog new/hdparm-7.4/Changelog
--- old/hdparm-7.3/Changelog 2007-04-30 19:25:30.000000000 +0200
+++ new/hdparm-7.4/Changelog 2007-06-01 00:11:07.000000000 +0200
@@ -1,9 +1,14 @@
+hdparm-7.4
+ - ignore ENOTTY response from DRIVE_CMD(NULL)
+ - decode CFA advanced timing information
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
+ - flush_cache before/after -W0 action
+ - use O_RDWR instead of O_RDONLY for better SG_IO compatibility
hdparm-7.2
- tweak -C
- added more debug info from --verbose
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/hdparm.8 new/hdparm-7.4/hdparm.8
--- old/hdparm-7.3/hdparm.8 2007-04-30 19:29:53.000000000 +0200
+++ new/hdparm-7.4/hdparm.8 2007-06-01 00:14:23.000000000 +0200
@@ -1,4 +1,4 @@
-.TH HDPARM 8 "April 2007" "Version 7.3"
+.TH HDPARM 8 "June 2007" "Version 7.4"
.SH NAME
hdparm \- get/set hard disk parameters
@@ -616,7 +616,10 @@
Parts by Benjamin Benz and others.
.SH SEE ALSO
.B http://www.t13.org/
-Technical Committee T13 AT Attachment (ATA) Interface.
+Technical Committee T13 AT Attachment (ATA/ATAPI) Interface.
.PP
.B http://www.serialata.org/
Serial ATA International Organization.
+.PP
+.B http://www.compactflash.org/
+CompactFlash Association
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/hdparm.c new/hdparm-7.4/hdparm.c
--- old/hdparm-7.3/hdparm.c 2007-04-30 19:23:03.000000000 +0200
+++ new/hdparm-7.4/hdparm.c 2007-05-10 15:12:27.000000000 +0200
@@ -24,7 +24,7 @@
extern const char *minor_str[];
-#define VERSION "v7.3"
+#define VERSION "v7.4"
#ifndef O_DIRECT
#define O_DIRECT 040000 /* direct disk access, not easily obtained from headers */
@@ -100,7 +100,7 @@
static int get_doreset = 0, set_doreset = 0;
static int get_tristate = 0, set_tristate = 0, tristate = 0;
-static int open_flags = O_RDONLY|O_NONBLOCK;
+static int open_flags = O_RDWR|O_NONBLOCK;
// Historically, if there was no HDIO_OBSOLETE_IDENTITY, then
// then the HDIO_GET_IDENTITY only returned 142 bytes.
@@ -266,12 +266,17 @@
printf("\n");
}
+#ifndef ENOIOCTLCMD
+#define ENOIOCTLCMD ENOTTY
+#endif
+
void flush_buffer_cache (int fd)
{
fsync (fd); /* flush buffers */
if (ioctl(fd, BLKFLSBUF, NULL)) /* do it again, big time */
perror("BLKFLSBUF failed");
- if (do_drive_cmd(fd, NULL) && errno != EINVAL) /* await completion */
+ /* await completion */
+ if (do_drive_cmd(fd, NULL) && errno != EINVAL && errno != ENOTTY && errno != ENOIOCTLCMD)
perror("HDIO_DRIVE_CMD(null) (wait for flush complete) failed");
}
@@ -1555,27 +1560,22 @@
} else if (0 == strcasecmp(name, "security-freeze")) {
set_freeze = 1;
} else if (0 == strcasecmp(name, "security-unlock")) {
- open_flags |= O_RDWR;
set_security = 1;
security_command = ATA_OP_SECURITY_UNLOCK;
get_security_password(0);
} else if (0 == strcasecmp(name, "security-set-pass")) {
- open_flags |= O_RDWR;
set_security = 1;
security_command = ATA_OP_SECURITY_SET_PASS;
get_security_password(1);
} else if (0 == strcasecmp(name, "security-disable")) {
- open_flags |= O_RDWR;
set_security = 1;
security_command = ATA_OP_SECURITY_DISABLE;
get_security_password(1);
} else if (0 == strcasecmp(name, "security-erase")) {
- open_flags |= O_RDWR;
set_security = 1;
security_command = ATA_OP_SECURITY_ERASE_UNIT;
get_security_password(1);
} else if (0 == strcasecmp(name, "security-erase-enhanced")) {
- open_flags |= O_RDWR;
set_security = 1;
enhanced_erase = 1;
security_command = ATA_OP_SECURITY_ERASE_UNIT;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/hdparm.lsm new/hdparm-7.4/hdparm.lsm
--- old/hdparm-7.3/hdparm.lsm 2007-04-30 19:32:10.000000000 +0200
+++ new/hdparm-7.4/hdparm.lsm 2007-06-01 00:11:53.000000000 +0200
@@ -1,8 +1,9 @@
Begin4
Title: hdparm
-Version: 7.3
-Entered-date: 2007-04-30
+Version: 7.4
+Entered-date: 2007-06-01
Description: hdparm - get/set hard disk parameters for Linux IDE drives.
+ v7.4 added CFA advanced timing info
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
@@ -59,7 +60,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
- 61K hdparm-7.3.tar.gz
+ 62K hdparm-7.4.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.3/identify.c new/hdparm-7.4/identify.c
--- old/hdparm-7.3/identify.c 2007-04-28 23:29:40.000000000 +0200
+++ new/hdparm-7.4/identify.c 2007-06-01 00:32:47.000000000 +0200
@@ -477,9 +477,9 @@
/* word 160: CFA power mode */
#define VALID_W160 0x8000 /* 1=word valid */
-#define PWR_MODE_REQ 0x2000 /* 1=CFA power mode req'd by some cmds*/
-#define PWR_MODE_OFF 0x1000 /* 1=CFA power moded disabled */
-#define MAX_AMPS 0x0fff /* value = max current in ma */
+#define PWR_MODE_REQ 0x2000 /* 1=CFA power level 1 is NOT supported */
+#define PWR_MODE_OFF 0x1000 /* 1=CFA power level 1 commands are DISABLED */
+#define MAX_AMPS 0x0fff /* value = max current in milli-amperes (mA) */
/* word 206: SMART command transport (SCT) */
static const char *feat_sct_str[16] = {
@@ -601,7 +601,7 @@
__u8 chksum = 0;
__u32 ll, mm, nn;
__u64 bb, bbbig; /* (:) */
- int transport;
+ int transport, is_cfa = 0;
memcpy(val, id_supplied, sizeof(val));
@@ -617,6 +617,7 @@
dev = ATA_DEV;
printf("ATA device, with ");
} else if(val[GEN_CONFIG]==CFA_SUPPORT_VAL) {
+ is_cfa = 1;
dev = ATA_DEV;
like_std = 4;
printf("CompactFlash ATA device, with ");
@@ -1106,26 +1107,91 @@
printf("\n");
}
- /* more stuff from std 5 */
- if((like_std > 4) && (eqpt != CDROM)) {
+ if (is_cfa) {
+ unsigned int mode, max, selected;
+ char modes[256];
+ modes[0] = '\0';
+
+ // CFA pio5-6:
+ max = val[163] & 7;
+ if (max == 1 || max == 2) {
+ selected = (val[163] >> 6) & 7;
+ for (mode = 1; mode <= max; ++mode) {
+ if (mode == selected)
+ strcat(modes, "*");
+ sprintf(modes + strlen(modes), "pio%u ", mode + 4);
+ }
+ }
+ // CFA mdma3-4:
+ max = (val[163] >> 3) & 7;
+ if (max == 1 || max == 2) {
+ selected = (val[163] >> 9) & 7;
+ for (mode = 1; mode <= max; ++mode) {
+ if (mode == selected)
+ strcat(modes, "*");
+ sprintf(modes + strlen(modes), "mdma%u ", mode + 4);
+ }
+ }
+ if (val[164] & 0x8000)
+ {
+ static const unsigned char io_times [4] = {255,120,100,80};
+ static const unsigned char mem_times[4] = {250,120,100,80};
+ max = val[164] & 7;
+ if (max <= 3)
+ printf("\t\tCFA max advanced io_udma cycle time: %uns\n", io_times[max]);
+ max = (val[164] >> 3) & 7;
+ if (max <= 3)
+ printf("\t\tCFA max advanced mem_udma cycle time: %uns\n", mem_times[max]);
+ // CFA ioport dma0-6:
+ max = (val[164] >> 6) & 7;
+ if (max <= 6) {
+ selected = (val[164] >> 12) & 7;
+ for (mode = 0; mode <= max; ++mode) {
+ if (mode == selected)
+ strcat(modes, "*");
+ sprintf(modes + strlen(modes), "io_udma%u ", mode + 4);
+ }
+ }
+ // CFA memory udma0-6:
+ max = (val[164] >> 9) & 7;
+ if (max <= 6) {
+ selected = (val[164] >> 12) & 7;
+ for (mode = 0; mode <= max; ++mode) {
+ if (mode == selected)
+ strcat(modes, "*");
+ sprintf(modes + strlen(modes), "mem_udma%u ", mode + 4);
+ }
+ }
+ }
+ if (modes[0])
+ printf("\t *\tCFA advanced modes: %s\n", modes);
+
if(val[CFA_PWR_MODE] & VALID_W160) {
- printf("CFA power mode 1:\n\t");
- if(val[CFA_PWR_MODE] & PWR_MODE_OFF) printf("dis");
- else printf("en");
- printf("abled");
+ if((val[CFA_PWR_MODE] & PWR_MODE_REQ) == 0)
+ printf(" *");
+ printf("\tCFA Power Level 1 ");
if(val[CFA_PWR_MODE] & PWR_MODE_REQ)
- printf(" and required by some commands");
- printf("\n");
+ printf(" not supported");
if(val[CFA_PWR_MODE] & MAX_AMPS)
- printf("\tMaximum current = %uma\n",val[CFA_PWR_MODE] & MAX_AMPS);
+ printf(" (max %umA)", val[CFA_PWR_MODE] & MAX_AMPS);
+ printf("\n");
+ }
+ //else printf("\t\tCFA Power modes not reported\n");
+ if (val[162] && val[162] != 0xffff) {
+ if (val[162] & 1)
+ printf("\t\tKey Management (CPRM) feature set\n");
}
- if((val[INTEGRITY] & SIG) == SIG_VAL) {
+ }
+
+ /* more stuff from std 5 */
+ if ((like_std > 4) && (eqpt != CDROM)) {
+ if ((val[INTEGRITY] & SIG) == SIG_VAL) {
printf("Checksum: %scorrect", chksum ? "in" : "");
if (chksum)
printf(" (0x%02x), expected 0x%02x\n", chksum, 0x100 - chksum);
putchar('\n');
} else {
- printf("\tIntegrity word not set (found 0x%04x, expected 0x%02x%02x)\n",
+ printf("Integrity word not set (found 0x%04x, expected 0x%02x%02x)\n",
val[INTEGRITY], 0x100 - chksum, SIG_VAL);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/Makefile new/hdparm-7.4/Makefile
--- old/hdparm-7.3/Makefile 2007-04-27 23:45:15.000000000 +0200
+++ new/hdparm-7.4/Makefile 2007-05-14 17:19:01.000000000 +0200
@@ -13,7 +13,8 @@
ifndef CC
CC = gcc
endif
-CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
+
+CFLAGS := -O2 -W -Wall -Wextra -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
LDFLAGS = -s
INSTALL = install
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/sgio.c new/hdparm-7.4/sgio.c
--- old/hdparm-7.3/sgio.c 2007-04-29 23:48:50.000000000 +0200
+++ new/hdparm-7.4/sgio.c 2007-05-14 17:12:14.000000000 +0200
@@ -161,6 +161,7 @@
cdb[11] = tf->hob.lbah;
}
+ memset(&sb, 0, sizeof(sb));
memset(&io_hdr, 0, sizeof(struct sg_io_hdr));
io_hdr.interface_id = 'S';
io_hdr.cmd_len = SG_ATA_16_LEN;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/hdparm-7.3/TODO new/hdparm-7.4/TODO
--- old/hdparm-7.3/TODO 2007-04-28 21:31:09.000000000 +0200
+++ new/hdparm-7.4/TODO 2007-05-10 20:54:06.000000000 +0200
@@ -15,3 +15,8 @@
- Add utility to recover data from a drive with bad sectors.
+- Use SCSI Inquiry for -I on ATAPI, especially with libata.
+
+- Use FLUSH_CACHE_EXT by default; fall back to FLUSH_CACHE if rejected
+
+- Add separate flag for "flush cache" by itself
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org