Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Index: firmware/target/arm/as3525/ata_sd_as3525.c
===================================================================
--- firmware/target/arm/as3525/ata_sd_as3525.c	(revision 21841)
+++ firmware/target/arm/as3525/ata_sd_as3525.c	(working copy)
@@ -244,7 +244,7 @@
 {
     unsigned long response;
     long init_timeout;
-    bool sdhc;
+    bool sd_v2 = false;
     unsigned long temp_reg[4];
     int i;

@@ -253,10 +253,10 @@

     mci_delay();

-    sdhc = false;
+    /*  CMD8  Check for v2 sd card */
     if(send_cmd(drive, SD_SEND_IF_COND, 0x1AA, MCI_RESP|MCI_ARG, &response))
         if((response & 0xFFF) == 0x1AA)
-            sdhc = true;
+            sd_v2 = true;

     /* timeout for initialization is 1sec, from SD Specification 2.00 */
     init_timeout = current_tick + HZ;
@@ -273,8 +273,8 @@
             return -3;
         }

-        /* acmd41 */
-        if(!send_cmd(drive, SD_APP_OP_COND, (sdhc ? 0x40FF8000 : (1<<23)),
+        /* acmd41  Set CCS bit only if we have a v2 sd card */
+        if(!send_cmd(drive, SD_APP_OP_COND, (0x00FF8000 | (sd_v2 ? 1<<30 : 0)),
                         MCI_RESP|MCI_ARG, &card_info[drive].ocr))
         {
             return -4;