From: Folkert van Heusden <folkert@vanheusden.com>
To: Alejandro Bonilla <abonilla@linuxwireless.org>
Cc: "'Jens Axboe'" <axboe@suse.de>,
hdaps-devel@lists.sourceforge.net,
"'Lenz Grimmer'" <lenz@grimmer.com>,
"'Arjan van de Ven'" <arjan@infradead.org>,
"'Jesper Juhl'" <jesper.juhl@gmail.com>,
"'Dave Hansen'" <dave@sr71.net>,
"'LKML List'" <linux-kernel@vger.kernel.org>
Subject: Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
Date: Thu, 7 Jul 2005 22:43:09 +0200 [thread overview]
Message-ID: <20050707204309.GB26802@vanheusden.com> (raw)
In-Reply-To: <001901c58301$5d4b5070$600cc60a@amer.sykes.com>
[-- Attachment #1: Type: text/plain, Size: 2485 bytes --]
Doesn't park here:
ehm:/home/folkert# ./park /dev/hda
head not parked 4c
ehm:/home/folkert# hdparm -i /dev/hda
/dev/hda:
Model=IC25N060ATMR04-0, FwRev=MO3OAD5A, SerialNo=MRG357K3KKN0XH
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=DualPortCache, BuffSize=7884kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117210240
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 3a:
* signifies the current active mode
[ 38.772050] hda: max request size: 1024KiB
[ 38.792458] hda: 117210240 sectors (60011 MB) w/7884KiB Cache, CHS=16383/255/63, UDMA(100)
> > > #include <stdio.h>
> > > #include <unistd.h>
> > > #include <fcntl.h>
> > > #include <string.h>
> > > #include <sys/ioctl.h>
> > > #include <linux/hdreg.h>
> > >
> > > int main(int argc, char *argv[])
> > > {
> > > unsigned char buf[8];
> > > int fd;
> > >
> > > if (argc < 2) {
> > > printf("%s <dev>\n", argv[0]);
> > > return 1;
> > > }
> > >
> > > fd = open(argv[1], O_RDONLY);
> > > if (fd == -1) {
> > > perror("open");
> > > return 1;
> > > }
> > >
> > > memset(buf, 0, sizeof(buf));
> > > buf[0] = 0xe1;
> > > buf[1] = 0x44;
> > > buf[3] = 0x4c;
> > > buf[4] = 0x4e;
> > > buf[5] = 0x55;
> > >
> > > if (ioctl(fd, HDIO_DRIVE_TASK, buf)) {
> > > perror("ioctl");
> > > return 1;
> > > }
> > >
> > > if (buf[3] == 0xc4)
> > > printf("head parked\n");
> > > else
> > > printf("head not parked %x\n", buf[3]);
> > >
> > > close(fd);
> > > return 0;
> > > }
Folkert van Heusden
--
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
Op zoek naar een IT of Finance baan? Mail me voor de mogelijkheden.
--------------------------------------------------------------------
UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)
a try, it brings monitoring logfiles to a different level! See
http://vanheusden.com/multitail/features.html for a feature-list.
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE
Get your PGP/GPG key signed at www.biglumber.com!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 282 bytes --]
next prev parent reply other threads:[~2005-07-07 20:43 UTC|newest]
Thread overview: 68+ 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 ` [Hdaps-devel] " Shawn Starr
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 [this message]
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
[not found] <4msjB-DS-9@gated-at.bofh.it>
[not found] ` <4mste-IL-1@gated-at.bofh.it>
[not found] ` <4msME-SM-9@gated-at.bofh.it>
[not found] ` <4msWl-Yq-5@gated-at.bofh.it>
[not found] ` <4mtza-1vg-15@gated-at.bofh.it>
[not found] ` <4mtII-1Ab-13@gated-at.bofh.it>
[not found] ` <4mtSm-1FA-5@gated-at.bofh.it>
[not found] ` <4mtSn-1FA-11@gated-at.bofh.it>
[not found] ` <4mwx1-3N9-25@gated-at.bofh.it>
[not found] ` <4mx9A-4qm-1@gated-at.bofh.it>
[not found] ` <4nzCr-6fN-19@gated-at.bofh.it>
[not found] ` <4nI36-527-9@gated-at.bofh.it>
2005-07-08 0:56 ` Bodo Eggert
2005-07-08 6:26 ` Jens Axboe
2005-07-08 8:49 ` Vojtech Pavlik
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=20050707204309.GB26802@vanheusden.com \
--to=folkert@vanheusden.com \
--cc=abonilla@linuxwireless.org \
--cc=arjan@infradead.org \
--cc=axboe@suse.de \
--cc=dave@sr71.net \
--cc=hdaps-devel@lists.sourceforge.net \
--cc=jesper.juhl@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.