[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rockbox-cvs
Subject:    iPod Classic: do not use HDD features on CE-ATA drives
From:       gerrit () rockbox ! org
Date:       2015-07-17 0:07:49
Message-ID: 201507170007.t6H07nZH001528 () giant ! haxx ! se
[Download RAW message or body]

commit 983c8084c9a64e48b29fb1e826cc84c35d2c9849
Author: Cástor Muñoz <cmvidal@gmail.com>
Date:   Thu Jul 16 23:10:38 2015 +0200

    iPod Classic: do not use HDD features on CE-ATA drives
    
    Fix an 'ATA error' issue that affects CE-ATA devices.
    
    Change-Id: I246348bb0506155b096ed8559dcf1b0b0fab3596

diff --git a/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c \
b/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c index 5806040..c629fd5 \
                100644
--- a/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c
+++ b/firmware/target/arm/s5l8702/ipod6g/storage_ata-ipod6g.c
@@ -688,14 +688,14 @@ static int ata_power_up(void)
         ata_dma = param ? true : false;
         dma_mode = param;
         PASS_RC(ata_set_feature(0x03, param), 3, 4);
+        if (ata_identify_data[82] & BIT(5))
+            PASS_RC(ata_set_feature(ata_bbt ? 0x82 : 0x02, 0), 3, 5);
+        if (ata_identify_data[82] & BIT(6)) PASS_RC(ata_set_feature(0xaa, 0), 3, 6);
         ATA_PIO_TIME = piotime;
         ATA_MDMA_TIME = mdmatime;
         ATA_UDMA_TIME = udmatime;
     }
     spinup_time = current_tick - spinup_start;
-    if (ata_identify_data[82] & BIT(5))
-        PASS_RC(ata_set_feature(ata_bbt ? 0x82 : 0x02, 0), 3, 5);
-    if (ata_identify_data[82] & BIT(6)) PASS_RC(ata_set_feature(0xaa, 0), 3, 6);
     if (ata_lba48)
         ata_total_sectors = ata_identify_data[100]
                             | (((uint64_t)ata_identify_data[101]) << 16)
@@ -1139,7 +1139,8 @@ int ata_bbt_reload(void)
             ata_virtual_sectors = ata_total_sectors;
         else if (!memcmp(buf, "emBIbbth", 8))
         {
-            if (ata_identify_data[82] & BIT(5)) PASS_RC(ata_set_feature(0x02, 0), 1, \
1); +            if (!ceata)
+                if (ata_identify_data[82] & BIT(5)) PASS_RC(ata_set_feature(0x02, \
                0), 1, 1);
             ata_virtual_sectors = (((uint64_t)buf[0x1fd]) << 32) | buf[0x1fc];
             uint32_t count = buf[0x1ff];
             if (count > ATA_BBT_PAGES / 64)
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs@cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic