Help - Search - Members - Calendar
Full Version: Why does the Linux MMC/SD driver not work for all?
OESF Forums > General Forums > Desktop Operating Systems Issues > Linux Issues
TonyOlsen
What's the difference between some of the SD/MMC cards so that some work and some don't? I bought a 1 GB MMC card and it works fine on Windows, but not in my SL-C860 Zaurus. The Zaurus can physically access every single bit on the card (surface scan returned perfectly), but as a mounted VFAT file system it has trouble writing to the card.

(See these links for more details).
Original thread
2nd Thread (much more advanced and technical)

My question is, what's the difference between the various MMC cards that make some work and some don't. Ditto' on the SD cards. I thought they all were part of a standard and that the hardware physically couldn't tell the difference between MMC card A and MMC card B if they are both the same size. ...but this doesn't appear to be true.

So... what are the differences? Why does the Linux driver work with some and not with others?

Also, is there an update driver in the works to fix this? (So the links above for more stats and debug information on my situtation).
iamasmith
It could be down to a timing issue of some kind, it could even be spec related.

There are quite a few posts knocking around saying there is generally more luck with Japanese manufactured cards than cards manufactured in other regions. - I don't think it could possibly be that the other cards aren't meeting official specs but there could be something timing related that the Z doesn't like.

Incidentally this issue isn't just down to the 860, the issues have been present as far back as the 5500s so it's a general Z problem.

The strange thing is that some cards work fine until formatted and some misbehave from day one whilst other cards work absolutely fine.

I have a PNY 128Mb SD card formatted as ext3 - works fine.
I also have a Jessops (UK Camera store) 512Mb SD card formatted as ext3 - works fine.

Both of these cards worked perfectly as FAT file systems too.

BTW: There was a site at one point that listed the cards with definite failures and successes - it seems to point to http://hacking.the.cia.com or something like that now sad.gif

- Andy
lardman
I've a 128MB MMC and a 256MB SD; both work fine (except with pdaXrom) as fat16 and ext2.

Si
TonyOlsen
So... it sounds like noone has tried using a large capacity (512 MB or more) MMC card in their Zaurus. Maybe my card is revealing a new problem with current MMC/SD driver...
TonyOlsen
Ok, I think I have a workable solution that might work. I suspect, like you mentioned above, that this is indeed a timing issue of some sort. It appears to only be a timing issue with writing and not with reading. Reading from the card appears to work just fine (in the other thread I mentioned how I copied many movies to the card (using my digital camera hooked via USB to my Windows98SE machine) and those movies played back just fine.

So, I'll simply use this 1 GB card for all of my read-only data (the data, movies, audio, Stratagus cool.gif biggrin.gif, etc which I'm always carrying around anyways) and move them off my 2 GB CF card to free up the space.

This means that this MMC card won't work for its indended e-mail storage solution (freeing up the CF slot for wireless or ethernet), but this will work fine until I save up enough to try this all over again with another MMC card (this time with extra Zaurus-compatibility research before buying the card).

But here's what I need to find out...

How do I make this card truly read-only? (So that the OS won't attempt to write to it and corrupt it all over again)

Is it as simple as a doing some kind of CHMOD (I'm new to that tool too) on "/usr/mnt/rom/card" and making it Read-Only for all groups? ...or would there be more to it than that?

Thanks in advance! smile.gif
tumnus
If you search around PalmOS based handheld forums and newsgroups, you will see that many other devices have had problems with MMC/SD cards and in particular good ole Sandisk.

So this is not just something limited to Zaurus or the Linux drivers. It seems the MMC/SD specs are either not clear enough or is not specific enough to ensure manufacturers stay within certain boundries.
TonyOlsen
CODE
bash-2.05$ su
# ls -l
drwxrwxrwx    5 root     root        16384 Dec 31  1969 card
drwxrwxrwx    7 root     root        16384 Dec 31  1969 cf
drwxr-xr-x    2 root     root            0 May 20  2002 net
# chmod ugoa-wxst card
# ls -l
dr-xr-xr-x    5 root     root        16384 Dec 31  1969 card
drwxrwxrwx    7 root     root        16384 Dec 31  1969 cf
drwxr-xr-x    2 root     root            0 May 20  2002 net
#          


Will that be enough? (I'm on a trip and my SD camera is back home, so I can't reformat my MMC card until this upcoming weekend)
TonyOlsen
My solution above appears to have worked. My card is full of useful read-only information.

Whenevr I open "ImagePad" it attempts to create an "icons" directory in the directory it is looking at. Since it isn't able to do this (since I remove write permissions) this can sometimes make the program to act flacky (images disappearing and folders disappearing), but this is easily solved by simply pressing the "On/Off" button and then turning it back on again.

This also says a little about the SD card problems and the current Linux SD/MMC drivers: When Linux is unable to write to a device, it limits (or hides) some reading from the device. In other words, when anything attempts to write to a directory (and ONLY while it is attempting to do so) some items in that directory suddenly aren't visible anymore. But as soon as Linux gives up writing to that deivce (which happens when I turn the unit off then on) the items come back to the list.

...and no corruption.

So... it appears to work fine as a read-only device. smile.gif

Of course, if anyone finds a way to get writing working too, that would be great.

I would assume that even timing issues can be solved in drivers (although it may make the driver run much more slowly).
SolarX
I guess your solution works fine... but if you want it according to the book, use mount -r to mount it, or add ro to the fstab options.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.