Difference between revisions of "Problem with APS harddisk parking"

From ThinkWiki
Jump to: navigation, search
m (supported/unsupported harddrive firmwares)
(Drives which have this problem: wikilink)
Line 21: Line 21:
  
 
=== Drives which have this problem ===
 
=== Drives which have this problem ===
* Hitachi HTS726060M9AT00 (7K60) on ThinkPad {{T43}}
+
* [[Hitachi Travelstar 7K60]] HTS726060M9AT00 on ThinkPad {{T43}}
 
* Fujitsu MHT2040AH (846C) on ThinkPad {{T41}} or {{R51}}
 
* Fujitsu MHT2040AH (846C) on ThinkPad {{T41}} or {{R51}}
  

Revision as of 13:02, 23 September 2006

When trying to enable APS functionality by installing hdaps_protect and hdapsd, the following problems might occur.

Problem with unload capabilities check

You may get the following kernel message when the disk is protected (e.g., via # echo 1 > /sys/block/sda/queue/protect):

ata_scsi_issue_protect_fn(): unload support NOT reported..
scsi_protect_queue(): head park not requested, used standby!..

or

idedisk_issue_protect_fn(): unload support NOT reported..
ide_protect_queue(): head park not requested, used standby!..
ATTENTION!
Using HDAPS in the above state may cause frequent drive spin downs, thereby wearing out your hard disk.

If you see this, and you are sure that your drive actually does support unloading (all original drives sold with HDAPS-equipped ThinkPads do), one of the following solutions might help.

Drives which have this problem

Solution for kernel 2.6.16 or later

The hdaps_protect patch for 2.6.16 now accepts the protect_method module parameter to override the parking capability detection, which accepts the following numeric values:

  • 0: autodetect capability
  • 1: "unload the head even if the drive doesn't report it has this capability"
  • 2: "standby even if unload is supported"

Hence, depending on your machine type, and whether the module is built into the kernel or not, you can use one of the following options:

If disk driver is built into kernel, add the following to your kernel boot parameters (e.g. /boot/grub/menu.lst):

   libata.protect_method=1
   ide-disk.protect_method=1

If disk driver is built as module, add the following to your modprobe configuration (e.g., /etc/modprobe.conf):

   options libata protect_method=1
   options ide-disk protect_method=1

In both cases, if you know whether you use ide-disk or libata, you can drop the other line.

Solution for kernel 2.6.15 and older

The following patch overrides automatic protect capability detection.

diff -u linux-2.6.15.hdaps/drivers/ide/ide-disk.c linux-2.6.15.hdaps/drivers/ide/ide-disk.c
--- linux-2.6.15.hdaps/drivers/ide/ide-disk.c	2006-01-18 07:11:54.000000000 +0000
+++ linux-2.6.15.hdaps/drivers/ide/ide-disk.c	2006-01-18 07:11:54.000000000 +0000
@@ -869,7 +869,7 @@
 	else
 		printk(KERN_DEBUG "idedisk_issue_protect_fn(): unload support NOT reported..\n");
 
-	return ide_protect_queue(q, (drive->id->cfsse & (1 << 13)) ? 1: 0);
+	return ide_protect_queue(q, 1);
 }
 
 int idedisk_issue_unprotect_fn(request_queue_t *q)
diff -u linux-2.6.15.hdaps/drivers/scsi/libata-scsi.c linux-2.6.15.hdaps/drivers/scsi/libata-scsi.c
--- linux-2.6.15.hdaps/drivers/scsi/libata-scsi.c	2006-01-18 07:15:31.000000000 +0000
+++ linux-2.6.15.hdaps/drivers/scsi/libata-scsi.c	2006-01-18 07:15:31.000000000 +0000
@@ -661,7 +661,7 @@
 		printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload support NOT reported..\n");
 
 	/* call scsi_protect_queue, requesting either unload or standby */
-	return scsi_protect_queue(q, ata_id_has_unload(dev->id) ? 1 : 0);
+	return scsi_protect_queue(q, 1);
 }
 
 static int ata_scsi_issue_unprotect_fn(request_queue_t *q)

Problem with Hard Drive Firmware

In case you see a message like below in # dmesg output after you have started the hdaps daemon, a firmware upgrade of your harddisk might solve your problem.

ide_protect_queue(): head NOT parked!.. 
ide_unprotect_queue(): No pending I/O, re-enabling power management..

Go to the IBM harddrive firmware update utility page and check if a firmware upgrade is available for your harddisk. IBM/Lenovo provides a bootdisk for easy firmware upgrade (~17MB download).

supported/unsupported harddrive firmwares

Use # hdparm -i /dev/hda to get your harddisk model name and firmware version (replace /dev/hda with the actual device for your hard drive). On newer models, you need # sdparm -i /dev/sda because of the SATA controller.

The following line is the important one in the output:

Model=HTS726060M9AT00, FwRev=MH4OA6GA, SerialNo=MRHXXXXXXXXX

The last four characters of the FwRev actually marks the firmware version.

The table lists known working / not working firmware versions with HDAPS

Drive firmware park command output
IC25N040ATCS04-0 CA40A71A not parked
IC25N040ATMR04-0 MO2OAD4A not parked
IC25N040ATMR04-0 MO2OADEA not parked
HTC426040G9AT00 00P4A0B4 parked
HTS548040M9AT00 MG20A5BA not parked
HTS548040M9AT00 MG20A5HA parked
HTS548080M9AT00 (TBA) parked
HTS541060G9AT00 MB3IA60A parked
HTS726060M9AT00 MH4OA6GA parked
Fujitsu MHT2040AH 846C parked
Fujitsu MHT2040AH 8471 parked