Proposed IDE change

Michael Cornwell (cornwell@acm.org)
Wed, 22 Sep 1999 19:44:26 -0700


Andre,

As you know I have been looking at the task file issues with
implementing SMART and think I have figured it out. I am assuming the
ioctl command for sendings ATA commands is as follows:

ioctl ( device, HDIO_DRIVE_CMD, { TF.7 , TF.3, TF.1, TF.2} );

where
TF.7 is the IDE_CONTROL_REG
TF.3 is the IDE_SECTOR_REG
TF.1 is the IDE_FEATURE_REG
TF.2 is the IDE_NSECTOR_REG

The task file register values were not being sent to the hard drive
correctly. So I made the small patch below to deal with the problem of
SMART commands. It fixed the problem for mine and Ragnar's SMART
utilities. I have tested both utilities with the patch and they work. To
do it right, the ide_cmd function needs some changes. Which requires
also change ide-disk.c. I can do it if you would like.

The patch was made with the latest 2.2.12 kernel with the
ide.2.2.12.19990921.patch.gz

Michael Cornwell
cornwell@acm.org

patch to ide.c

1028c1028,1032
< }

---
>           OUT_BYTE(args[2],IDE_FEATURE_REG);
>           OUT_BYTE(args[1],IDE_SECTOR_REG);
>           ide_cmd(drive, args[0], args[3], &drive_cmd_intr);
>           return;
>                 }

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/