lkml.org 
[lkml]   [2005]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
Hello,

Just for the records....
-----
root@ecam:~$ ./headpark /dev/hda
head not parked 4c
-----

HDD is a desktop Maxtor Diamond MaxPlus 9 120GB
on a Promise Ultra133 TX2 IDE Controller.

Well, sure, it's not a notebook HDD, but maybe it's possible
to give headpark a more generic way to get the heads parked?

Are the commands different per HDD model / manufacturer?
Then we might need some information to send the proper
commands to the different types?!
And if there is no headpark command, might it be valuable to send
the HDD a shutdown instead?

PS:
I'm working on an embedded PowerPC (MPC8540) system which
will be turned into a high-resolution portable camera in
the future (with acceleration sensors for the right image
orientation). Therefore it will likely be another candidate
for a Drop'n'Park or Drop'n'Stop (tm) feature as are planning
to put a 2.5" notebook HDD into the cam, too.

Greets,

Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

Jens Axboe wrote:
> On Mon, Jul 04 2005, Jens Axboe wrote:
>
>>On Mon, Jul 04 2005, Lenz Grimmer wrote:
>>
>>>-----BEGIN PGP SIGNED MESSAGE-----
>>>Hash: SHA1
>>>
>>>Hi,
>>>
>>>Jens Axboe wrote:
>>>
>>>
>>>>It isn't too pretty to rely on such unreliable timing anyways. I'm
>>>>not too crazy about spinning the disk down either, it's useless wear
>>>>compared to just parking the head.
>>>
>>>Fully agreed, and that's the approach the IBM Windows driver seems to
>>>take - you just hear the disk park its head when the sensor kicks in
>>>(you can hear it) - the disk does not spin down when this happens.
>>>
>>>Could this be some reserved ATA command that only works with certain#
>>>drives?
>>
>>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.
>
>
> ATA7 defines a park maneuvre, I don't know how well supported it is yet
> though. You can test with this little app, if it says 'head parked' it
> works. If not, it has just idled the drive.
>
>
> #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;
> }
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-07 19:07    [W:0.097 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site