From: Shawn Starr <shawn.starr@rogers.com>
To: Jens Axboe <axboe@suse.de>, Lenz Grimmer <lenz@grimmer.com>
Cc: hdaps-devel@lists.sourceforge.net,
LKML List <linux-kernel@vger.kernel.org>
Subject: Re: [Hdaps-devel] Re: IBM HDAPS things are looking up
Date: Mon, 4 Jul 2005 10:32:17 -0400 (EDT) [thread overview]
Message-ID: <20050704143217.41663.qmail@web88012.mail.re2.yahoo.com> (raw)
In-Reply-To: <20050704132516.GO1444@suse.de>
>From what I'm told its not specific to hard disk, you
can put any laptop HD and it will work the same (?).
Shawn.
--- Jens Axboe <axboe@suse.de> wrote:
> On Mon, Jul 04 2005, Lenz Grimmer wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi Jens!
> >
> > Thanks for the sample code. I've trimmed the
> recipient list a bit...
> >
> > Jens Axboe wrote:
> >
> > > Perhaps the IDLE or IDLEIMMEDIATE commands imply
> a head parking, that
> > > would make sense. As you say, you can hear a
> drive parking its head.
> > > Here's a test case, it doesn't sound like it's
> parking the hard here.
> >
> > Not here either, but let me check, if I understand
> this correctly:
> >
> > > #include <stdio.h>
> > > #include <unistd.h>
> > > #include <fcntl.h>
> > > #include <sys/ioctl.h>
> > > #include <linux/hdreg.h>
> > >
> > > int main(int argc, char *argv[])
> > > {
> > > char cmd[4] = { 0xe1, 0, 0, 0 };
> >
> > The "0xe1" in here is what is defined as
> "WIN_IDLEIMMEDIATE" in hdreg.h,
> > correct?
>
> Correct.
>
> > > int fd;
> > >
> > > if (argc < 2) {
> > > printf("%s <dev>\n", argv[0]);
> > > return 1;
> > > }
> > >
> > > fd = open(argv[1], O_RDONLY);
> >
> > Hmm, don't I need to actually have *write* access
> for sending an ioctl?
>
> No, but you need CAP_SYS_RAWIO capability. So run it
> as root.
>
> > > if (fd == -1) {
> > > perror("open");
> > > return 1;
> > > }
> > >
> > > if (ioctl(fd, HDIO_DRIVE_CMD, cmd))
> > > perror("ioctl");
> > >
> > > close(fd);
> > > return 0;
> > > }
> >
> > I will give it another try, after clarifying the
> above questions - maybe
> > there is a command that will perform the desired
> task. If not, I guess
> > we're back at snooping what the Windows driver
> does here...
>
> I'm not aware of a generally specificed command,
> it's likely that the
> ibm drive has a vendor specific one. Or that one of
> the idle commands
> can be configured to park the drive. Or... I'm not
> sure you'll find
> anything interesting in the windows driver, I would
> imagine that the
> user app is the one issuing the ide command (like
> the linux equiv would
> as well).
>
> --
> Jens Axboe
>
>
>
>
-------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux
> Migration Strategies
> from IBM. Find simple to follow Roadmaps,
> straightforward articles,
> informative Webcasts and more! Get everything you
> need to get up to
> speed, fast.
>
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Hdaps-devel mailing list
> Hdaps-devel@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/hdaps-devel
>
next prev parent reply other threads:[~2005-07-04 14:33 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-04 1:32 IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer)) Jesper Juhl
2005-07-04 2:12 ` Alejandro Bonilla
2005-07-04 6:00 ` Lenz Grimmer
2005-07-04 6:17 ` Jens Axboe
2005-07-04 5:30 ` Alejandro Bonilla
2005-07-04 6:37 ` Jens Axboe
2005-07-04 7:16 ` Arjan van de Ven
2005-07-04 7:22 ` Jens Axboe
2005-07-04 7:27 ` Arjan van de Ven
2005-07-04 7:30 ` Jens Axboe
2005-07-04 10:33 ` Lenz Grimmer
2005-07-04 11:06 ` Jens Axboe
2005-07-04 13:18 ` IBM HDAPS things are looking up Lenz Grimmer
2005-07-04 13:25 ` Jens Axboe
2005-07-04 14:32 ` Shawn Starr [this message]
2005-07-07 8:03 ` IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer)) Jens Axboe
2005-07-07 8:41 ` Head parking (was: IBM HDAPS things are looking up) Lenz Grimmer
2005-07-07 8:48 ` Jens Axboe
2005-07-07 10:17 ` [Hdaps-devel] " Lenz Grimmer
2005-07-07 15:06 ` Shawn Starr
2005-07-07 9:07 ` Pekka Enberg
2005-07-07 11:44 ` Jens Axboe
2005-07-07 13:28 ` Pekka Enberg
2005-07-07 14:28 ` IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer)) Shawn Starr
2005-07-07 14:37 ` Alejandro Bonilla
2005-07-07 15:06 ` Jens Axboe
2005-07-07 20:43 ` Folkert van Heusden
2005-07-07 15:05 ` Jens Axboe
2005-07-07 23:00 ` Jon Escombe
2005-07-07 23:31 ` Alejandro Bonilla
2005-07-08 6:31 ` Jens Axboe
2005-07-08 18:32 ` Shawn Starr
2005-07-07 15:03 ` Shawn Starr
2005-07-07 17:02 ` Clemens Koller
2005-07-07 17:15 ` Alejandro Bonilla
2005-07-07 17:34 ` Jens Axboe
2005-07-07 17:49 ` Matthew Garrett
2005-07-07 18:52 ` Jens Axboe
2005-07-07 17:27 ` Jens Axboe
2005-07-07 17:38 ` Dave Hansen
2005-07-07 18:01 ` Lee Revell
2005-07-07 18:03 ` Dave Hansen
2005-07-07 18:48 ` Jens Axboe
2005-07-04 13:03 ` Pavel Machek
2005-07-04 20:30 ` IBM HDAPS things are looking up Lenz Grimmer
2005-07-04 22:12 ` Pavel Machek
2005-07-04 21:08 ` IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer)) Alejandro Bonilla
2005-07-05 7:14 ` Jens Axboe
2005-07-05 12:29 ` Alejandro Bonilla
2005-07-05 15:41 ` Sander
2005-07-05 15:52 ` Alejandro Bonilla
2005-07-05 15:45 ` Lee Revell
2005-07-04 10:28 ` Lenz Grimmer
2005-07-04 14:27 ` Shawn Starr
2005-07-04 14:46 ` Jens Axboe
2005-07-04 17:24 ` IBM HDAPS things are looking up Alejandro Bonilla
2005-07-04 18:36 ` dean gaudet
2005-07-05 5:13 ` Lee Revell
2005-07-04 18:40 ` Jens Axboe
2005-07-04 18:59 ` IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer)) Aaron Cohen
2005-07-04 19:27 ` Lenz Grimmer
2005-07-04 8:45 ` Andrey Panin
2005-07-04 10:49 ` Pekka Enberg
2005-07-04 11:00 ` Jesper Juhl
2005-07-04 12:32 ` Pavel Machek
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=20050704143217.41663.qmail@web88012.mail.re2.yahoo.com \
--to=shawn.starr@rogers.com \
--cc=axboe@suse.de \
--cc=hdaps-devel@lists.sourceforge.net \
--cc=lenz@grimmer.com \
--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
all inboxes | Powered by JetHome®