FORUMS

Motorola DEFY sd card driver FIX

542 posts
Thanks Meter: 249
 
By crakeron, Senior Member on 30th September 2011, 12:48 PM
Post Reply Email Thread
DO NOT APPLY THE ZIP I UPLOADED, READ EDIT 2


Edit: I will make a flashable fix in a .zip inspired from CM7 RC1.5, with only the mmcfix in it, therefor anybody can use it, even people on official ROMs or other custom ROMs than CM7.

Work in progress....

Flashable zip nearly ready with mmcfix from CM7...

Zip script works correctly, testing...

Soft brick..

Flashed back my stock Froyo, restoring my nandroid backup (this shows you how important a backup can be! )....

Back to work! ^^ .....

Edit 2: I'll upload my mmcfix_signed_crakeron.zip for show only, it !!!DOES NOT WORK!!! right now and if you apply it through CWM you will !!!SOFTBRICK!!!. It is for people to take a look at it only, especially my update-script, and try and figure out what is wrong, or in my opinion, what i have forgot to put in it, seen as there is no sytax problems.






Hi all,

As you all know, our lovely Defy seems to have a problem when it comes to using sd cards... where *GENERALLY* all class 2 cards are fine, and problems may occur with higher class cards.
The problem is basically: the phone loses its write acces to the card, and therefor for example the photo camera app can take pictures, but can't save them... Another sign of this issue would be an absurd "SD Card damages/corrupted, please format" notification, and the sdcard never mounting again untill you well...re-format the card. This happens to me once a week, making me have to backup my stuff to the pc, format the card, and then put it all back on the card, and voila off we go till the next "false corruption" .

I've done some research, seen as this is a software issue, and not hardware, and i have found out it is an OMAP kernel issue:

"SD card problems since 2.2 update is a bug in OMAP kernel sources for froyo. CyanogenMod developpers worked hard to patch the kernel but it is hard to correct motorola bugs due to the locked bootloader." (source: Motorola support forums")

here is what i also found:
http://maemo.org/community/maemo-use...nd_corruption/

To resume the thread, a Nokia n900 user, which also has a TI OMAP proc., discovered what was faulty:
some function in the driver (to keep this simple i will not name it, people interested and devs please just click on the link), dynamically calculates a DTO value based on the SD card's caracteristics. THIS IS WHAT IS NOT WORKING CORRECTLY

the guy simply modified a function in the omap_hsmmc driver so as it would use a constant universal DTO value, that would work with all sdcards, turning the DTO from dynamic, to static

Right, now you're thinking "what has this got to do with our Defy?"

Well...it has been sead in motorola milestone forum in xda, that:
"Since N900 uses the same SOC as Milestone and probably much of the drivers code are the same, perhaps the fix for N900 could be implemented as well? Not sure whether TI OMAP drivers are builtin in the kernel or not... If possible, could you please check this?"
(source: http://forum.xda-developers.com/show...postcount=5563)

and it is also said somewhere that this fix should also apply to the Motorola Defy.


I think I could be capable of making this fix for us, i just need some help:

(1) Where is the omap mmc driver situated in our /system ?


After having found it, i can copy it on to my sd card, and open it up and have a look (it is expected to be a C language file, i'm familiar enough with C to be able to edit the driver )

(2) I would like that driver from an official 2.1 ROM, and one from a 2.2 one, just to compare them


What do you think guys? If one of you know where to find the driver could you PM me to help me get started?


P.S This is not a thread about who's sdcard works and who's doesn't, so don't post millions of "my kingston 8gb class X works fine"


P.P.S Hit the THANKS! button if you want to support me, it costs nothing and makes my day!
Attached Files
File Type: zip mmcfix_signed_crakeron.zip - [Click for QR Code] (6.0 KB, 266 views)
The Following 10 Users Say Thank You to crakeron For This Useful Post: [ View ] Gift crakeron Ad-Free
30th September 2011, 12:57 PM |#2  
Senior Member
Thanks Meter: 59
 
More
the fix is already included in cyanogenmod since RC 1.5
30th September 2011, 01:11 PM |#3  
crakeron's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 249
 
Donate to Me
More
reserved for futur use
30th September 2011, 01:13 PM |#4  
crakeron's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 249
 
Donate to Me
More
Quote:
Originally Posted by vick33

the fix is already included in cyanogenmod since RC 1.5

I know, but some of us out here don't want to go CyanogenMod, i'll contact Quarx and see if he could cooperate with me so that every one and every ROM could benefit from the fix
30th September 2011, 01:44 PM |#5  
Senior Member
Thanks Meter: 59
 
More
Quote:
Originally Posted by crakeron

I know, but some of us out here don't want to go CyanogenMod, i'll contact Quarx and see if he could cooperate with me so that every one and every ROM could benefit from the fix

The sources are public you can use them if you want. Now cyanogenmod is extremely good and stable. Because of the same kernel i think you can use the modul from cyanogenmod. Try if it works or not.
30th September 2011, 02:22 PM |#6  
crakeron's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 249
 
Donate to Me
More
Quote:
Originally Posted by vick33

The sources are public you can use them if you want. Now cyanogenmod is extremely good and stable. Because of the same kernel i think you can use the modul from cyanogenmod. Try if it works or not.

Will do. I'm working on it right now and planning to make a flashable .zip for cwm, that way everyone will have the fix

P.S. this is exciting
30th September 2011, 06:19 PM |#7  
crakeron's Avatar
OP Senior Member
Flag Paris
Thanks Meter: 249
 
Donate to Me
More
Made the update zip, the script seems to be OK, but just a bit missing, the device didn't like having something added in /system/lib/modules. I had write acces to it, maybe i have to put acces back to read only before ending script?

You can have a look at it to try and find out, but DO NOT flash the zip or you'll soft brick
7th October 2011, 07:40 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Hi Crackeron, any good news for your script ?

Best regards

Cordialement...
11th October 2011, 05:25 PM |#9  
tegezan's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 283
 
More
Quote:
Originally Posted by alias4defy

Hi Crackeron, any good news for your script ?

Best regards

Cordialement...

no aka fail
30th October 2011, 10:31 AM |#10  
Junior Member
Thanks Meter: 0
 
More
i´m waiting for this fix too!!!
30th October 2011, 11:45 AM |#11  
carlo93's Avatar
Senior Member
Thanks Meter: 289
 
More
I've built an update-script which writes the module into "/system" partition.
In case of soft-brick, i've built another script which erases the file.

I've flashed it on CM7 ( 15th of october ) and it worked as the fix is already embedded in the ROM.
Let me know whether it works with other ROMs.

P.S. Scripts are written in Edify syntax.
Update: i forgot to include the init.d script that loads the fix once the device is on.
Now i've fixed. It should work!
Attached Files
File Type: zip mmcfix.zip - [Click for QR Code] (188.2 KB, 124 views)
File Type: zip mmcfix_undo.zip - [Click for QR Code] (186.2 KB, 66 views)
The Following 2 Users Say Thank You to carlo93 For This Useful Post: [ View ] Gift carlo93 Ad-Free
Post Reply Subscribe to Thread

Tags
defy, driver, fix, issue, sd card

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes