logo       

Re: Success booting linux from 2GB MMC+ card: msg#00055

linux.ports.h2200

Subject: Re: Success booting linux from 2GB MMC+ card



Ok, I'm back and here's the news. First, I bought a new cardreader,
Kingston FCR-HS215/1 (http://www.kingston.com/flash/15in1.asp), because
my old cardreader, mentioned in previous posts, is not exactly cardreader,
but in fact is a Panasonic camcorder (NV-GS120), which uses SD/MMC card
for storing lousy 1,5MPix photos. FCR-HS215 has MMCplus as one of
the supported formats, so i guess, it shouldn't be broken for my card.

I made some experiments. I connected FCR-HS215 to Windows 2000
machine, partitioned and formatted with default options my card
(it took a lot of time before I found how to partition in Win2000+ - there's
no fdisk, and you need to use Adminstrative Tools -> Computer Management
-> Disk Management instead). After formatting i put on card some files
for testing.

When I connected this reader with card to Linux PC, dmesg said that device
uses 512-byte sectors:

Vendor: Generic Model: STORAGE DEVICE Rev: 9321
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sdb: 3995648 512-byte hdwr sectors (2046 MB)

fdisk said:

Disk /dev/sdb: 255 heads, 63 sectors, 248 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 248 1992028+ 6 FAT16

I mounted card without any problems, all files seem ok.
When i inserted card into Panasonic camcorder, using it as a reader
connected to Linux PC, there was also no problems with reading files from
the card. And even more - camcorder itself seemed to be happy with this
card format. It can make some lousy 1.5Mpix photos and then I
can read them with camcorder itself or with FCR-HS215.
It's a pity, but i didn't found "Format card" in camcorder's menu, so I
can't say which format it uses as default.

Also, i tried to insert this card into my colleague's notebook made by
Fujitsu-Siemens with installed WinXP Home and built-in SD/MMC cardreader.
But there's no luck - it detects card's insert and shows removable drive,
but can't read from it. I even tried to partition it, but Disk Management
after very long pause said "Cannot read disk". I don't know what chip
this notebook uses, windows' Device Manager shows it as "Generic SDA
compatible SD host controller". I also tried to insert card into my
colleague's HP iPAQ 2750 (windows CE), but it simply showed no reaction.
So, as you can see, there's compatibility issues even in windows land.

Ok, there's still a lack of information, but anyway here's my theory, that
at least USB readers use 512b sector size in both windows and linux.

Now, let's back to our linux on iPAQ 2210. Of course, I can't mount and
read this windows formatted card on my iPAQ, because linux (without
512b/sector hack) calculates wrong offset for beginning of first
partition. But anyway, as you suggested, I partitioned and formatted card
on iPAQ with 1024b/sector geometry (btw, thanks for the wonderful patchset
for CF booting!). And with expected lose of ability to mount this card
on PC, I got some unexpected results - linux started to experience
stability problems. After a little time working with MMC+ card, on some write
operation (sometimes as innocent as mkdir/rmdir), it suddenly locks with
"mmcqd" kernel daemon eating all of the CPU. Command caused lock becomes
uninterruptible, and then I can't do anything with MMC+ card until
hard reset and reboot. When i turned MMC debugging on, in case of lockup
I got this message on console, constantly repeating:

MMC: starting cmd 0d arg 00010000 flags 00000009
<7>samcop sdi: request: [CMD] opcode:0x0d arg:0x00010000 flags:9
retries:5
samcop sdi: IRQ csta=0x00000a0d dsta=0x00000000 dcnt:0x00000000
fsta:0x00000000
samcop sdi: IRQ transfer closed.
samcop sdi: IRQ csta=0x00000a0d dsta=0x00000000 dcnt:0x00000000
fsta:0x00000000
samcop sdi: IRQ clear imask.
[CMD] request complete.
samcop sdi: request done.


Also, I tried to find why upstream patch with improved MMC card block
size selection doesn't work for me. I inserted printk, and found that
card reports these abilities:
write sector size = 1024
read sector size = 1024
partial read = yes
partial write = no
And because of lack of partial write, driver uses 1024b as a sector
size. Hmm, that's pretty strange, why then card works with 512b/sector
hack - is it because of some compatibility mode?

That's all by now.

Dmitry 'Mad' Artamonow


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise