Hi,

Since updating my cubietruck to u-boot-2014.10 the SATA hard drive
connected to it performs emergency head parking around the time
uboot hands over control to kernel (or kernel is booting).

The same issue also exists during reboot.

Looking at the changes in u-boot-2014.10 SATA support has been added.

It looks like u-boot is setting up SATA then kernel is doing the same,
killing SATA power while reconfiguring the AHCI or SATApower GPIO.

Could u-boot put SATA drive into standby (or at least ask it to sync
and park its heads) prior to handing control over to kernel?

On the other hand it would be nice if SATApower could be preserved
along the different steps of boot process.



On kernel side I'm using the following patch to protect the SATA drive
during reboot:

Author: Bruno Prémont <[email protected]>
Date:   Wed Jul 9 22:50:43 2014 +0200

    sd: Stop disks on reboot
    
    Some systems (e.g. Acer Travelmate 66x laptop, Cubietruck) to
    power-reset on reboot and thus make disks age more quickly due to
    emergency head parking & stop.
    
    Do not prevent stopping disk on reboot even if it might slow down
    following boot process.
---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 2c2041c..e5ff75f 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3158,7 +3158,7 @@ static void sd_shutdown(struct device *dev)
                sd_sync_cache(sdkp);
        }
 
-       if (system_state != SYSTEM_RESTART && sdkp->device->manage_start_stop) {
+       if (sdkp->device->manage_start_stop) {
                sd_printk(KERN_NOTICE, sdkp, "Stopping disk\n");
                sd_start_stop_device(sdkp, 0);
        }

Attachment: signature.asc
Description: PGP signature

Reply via email to