public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@sun.com>
To: andre@linux-ide.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] SMART enable early
Date: Wed, 24 Oct 2001 14:31:24 -0700	[thread overview]
Message-ID: <3BD7332C.ABF2B2F8@sun.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

>From ATA spec proposal 1e:


8.55.3.8 Description (SMART ENABLE OPERATIONS)

This command enables access to all SMART capabilities within the device.
Prior to receipt of this command SMART data are neither monitored nor saved
by the device.

You HAVE to enable SMART as early as possible to have any meaningful data. 
And, as best I can tell, it is never DISABLED anywhere.  So once you read
from /proc/.../smart_values SMART is on.  

I think the patch is actually OK.  Unless you can point out where in the
spec I am missing something.

Tim
-- 
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com

[-- Attachment #2: ide-smart.diff --]
[-- Type: text/plain, Size: 726 bytes --]

diff -ruN dist-2.4.12+patches/drivers/ide/ide-disk.c cvs-2.4.12+patches/drivers/ide/ide-disk.c
--- dist-2.4.12+patches/drivers/ide/ide-disk.c	Mon Oct 15 10:21:49 2001
+++ cvs-2.4.12+patches/drivers/ide/ide-disk.c	Mon Oct 15 10:21:49 2001
@@ -569,13 +569,13 @@
 		drive->special.b.set_multmode = 1;
 }
 
-#ifdef CONFIG_PROC_FS
-
 static int smart_enable(ide_drive_t *drive)
 {
 	return ide_wait_cmd(drive, WIN_SMART, 0, SMART_ENABLE, 0, NULL);
 }
 
+#ifdef CONFIG_PROC_FS
+
 static int get_smart_values(ide_drive_t *drive, byte *buf)
 {
 	(void) smart_enable(drive);
@@ -799,6 +799,7 @@
 #endif
 	}
 	drive->no_io_32bit = id->dword_io ? 1 : 0;
+	(void) smart_enable(drive);
 }
 
 static int idedisk_reinit (ide_drive_t *drive)

                 reply	other threads:[~2001-10-24 21:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD7332C.ABF2B2F8@sun.com \
    --to=thockin@sun.com \
    --cc=andre@linux-ide.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox