Poll

What's the largest MMC (not SD) card you've gotten working (fully partitioned in 1 partition) on your Zaurus?  (Comment below in this thread on this as well)

N/A.  I've never had an MMC card working in my Zaurus
6 (35.3%)
128 MB or less
6 (35.3%)
129-256 MB
2 (11.8%)
257-512 MB
2 (11.8%)
513-1024 MB
1 (5.9%)
More than 1 GB
0 (0%)

Total Members Voted: 16

Author Topic: Why does the Linux MMC/SD driver not work for all?  (Read 5529 times)

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Why does the Linux MMC/SD driver not work for all?
« on: September 27, 2004, 03:05:30 pm »
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).
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Why does the Linux MMC/SD driver not work for all?
« Reply #1 on: September 27, 2004, 04:13:44 pm »
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

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Why does the Linux MMC/SD driver not work for all?
« Reply #2 on: September 27, 2004, 06:41:59 pm »
I've a 128MB MMC and a 256MB SD; both work fine (except with pdaXrom) as fat16 and ext2.

Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Why does the Linux MMC/SD driver not work for all?
« Reply #3 on: September 28, 2004, 01:46:06 pm »
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...
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Why does the Linux MMC/SD driver not work for all?
« Reply #4 on: October 06, 2004, 06:55:20 pm »
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    , 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!  
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Why does the Linux MMC/SD driver not work for all?
« Reply #5 on: October 06, 2004, 07:14:09 pm »
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.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Why does the Linux MMC/SD driver not work for all?
« Reply #6 on: October 06, 2004, 07:21:22 pm »
Code: [Select]
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)
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

TonyOlsen

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
    • http://www.userdimensions.com/Tony/Resume.html
Why does the Linux MMC/SD driver not work for all?
« Reply #7 on: October 12, 2004, 11:14:05 am »
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.  

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).
Tony Olsen
Ferris@Myself.Com
Resume
Zaurus SL-C860 QTopia
2 GB Static CF
1 GB MMC (although it isn't working yet)
My Quest: To get an x86 emulator working on my Zaurus and to have my Zaurus replace my laptop as my MAIN computer
Publically available Videos for the default Zaurus SL-C860 video player

SolarX

  • Newbie
  • *
  • Posts: 41
    • View Profile
Why does the Linux MMC/SD driver not work for all?
« Reply #8 on: October 18, 2004, 06:52:00 pm »
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.