[Defy General] crakeron:
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" :mad: .

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-users/n900_microsd_card_i-o_errors_and_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

:p

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

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://xdaforums.com/showpost.php?p=17033833&postcount=5563)

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

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! :D