Bug 1204 (int-62927)

Summary: MMC read-only/corruption bug persists...
Product: [Maemo Official Platform] Core Reporter: Tim Samoff <tim>
Component: KernelAssignee: Quim Gil <quim.gil>
Status: RESOLVED FIXED QA Contact: linux-kernel-bugs
Severity: critical    
Priority: High CC: ahs3, anidel, bugzilla770, danramos, dropbox, dufkaf, dunsun, eero.tamminen, fozzy, henri.bergius, james, jon.eyre, kozlovsk, mac_os_x, maemo, seppo.korpelainen, sjm8-maemo, steve.elliott, tolgam, tonymaro, Tor.Arntsen, twegener, VIIIeightE
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: Linux   

Description Tim Samoff (reporter) maemo.org 2007-04-10 18:34:41 UTC
My MMC2 (internal) card was just "automagically" set to read-only for me (and, 
unfortunately, corrupted).

Originally, this bug only occurred for 4GB SD cards in MMC1 -- that bug report 
was set to WORKSFORME.

This time:

I've benn using the new Camera app (video version) since it was released... It 
is set to save to MMC2. I had about 50 photos saved.

This morning, I took a photo (no errors) and then went to look at it. The app's 
file browser told me no photos could be found. When I tried to take another 
photo, it told me that there was no writable directory.

I checked the card with the File Manager app and found thhat MMC2 was indeed now 
set to read-only.

Then, I checked the camera\images directory on MMC2 and found that it was 
corrupted (i.e., it no longer shows as a folder icon, but as an unkown file icon 
-- that cannot be opened.

I have not yet had the chance to check the card in Windows.
Comment 1 Neil MacLeod maemo.org 2007-04-10 18:39:18 UTC
Mount the card in Windows, and if it works fine without making any changes to
the files try and mount the card again in your N800 and post the results. From
my experience simply mounting the card in Windows will fix whatever problem the
N800 is experiencing, which suggests the N800 vfat driver is overly sensitive to
"routine" problems that can occur in the FAT filesystem. If this is what you
see, it's still a bug. :)
Comment 2 Tim Samoff (reporter) maemo.org 2007-04-10 21:51:38 UTC
*** Bug 1205 has been marked as a duplicate of this bug. ***
Comment 3 Jake Kunnari 2007-04-11 15:12:00 UTC
Hi Tim, i've been trying to reproduce your problem but with "bad" luck. I 
can't get my 4GB sd cards to readonly (corrupted) mode. I have two 4GB cards 
in my N800. Changing status to WORKSFORME. If there is some info which can 
help me to reproduce this error, please provide that info to this bug report.
Comment 4 Tim Samoff (reporter) maemo.org 2007-04-11 20:22:22 UTC
Windows can mount my "read-only" external (MMC2) card, but with issues... It
can
read it and write to it, but it can't complete a Check Disk -- the error isn't
descriptive, it just says that it can't. Likewise, it can't delete an old Check
Disk file directory that was placed on the card during the last Check Disk I
did.

Post-Windows, the N800 can't recognize the card at all (looks like I'll have to
reformat it again).

Windows was able to complete the Disk Check on my internal card (the one with
the corrupted camera\images directory), but it deleted the camera\images
directory in the process.

Post-Windows, the N800 sees the card, but it shows absolutely NO files on the
card (there are some). Likewise, the card is still read-only.
Comment 5 Tim Samoff (reporter) maemo.org 2007-04-16 16:12:06 UTC
I thought I'd reopen this until someone can check out this new post (not from
me) at ITT:

http://www.internettablettalk.com/forums/showthread.php?p=44424
Comment 6 Tim Samoff (reporter) maemo.org 2007-04-20 20:20:39 UTC
Update:

I have been using my cards a lot lately, but only "altering" them via a card
reader and my PC (i.e., I am not plugging the N800 into my PC and altering the
cards that way as I had been in the past). Everything seems to be working and
the cards remain read/write. Likewise, I have had no corruption issues.
Comment 7 Maximilian Mann 2007-04-25 00:44:02 UTC
I cant even get the sd cards to read on my Windows machine...
Comment 8 Tim Samoff (reporter) maemo.org 2007-04-26 15:51:50 UTC
Update:

I lied... I haven't used my removable card for days now, other than playing some
mp3s from it.

I just tried to copy a couple of N800 screen shots to is (on the N800) and it
thinks that the card is NOT writable.

Mounting the card (via a card reader) on my PC did NOT fix the problem.
Comment 9 Matti Savolainen 2007-05-04 23:05:40 UTC
Just confirming that I'm suffering this same issue. My 4GB SD card has
corrupted numerous times since my purchase of the N800 in February. This also
happened with 1GB RS-MMC card that I used with my previous 770 without any
issues! The icing of the cake is that one 2GB SD card broke completely (can not
be detected with any hardware: N800, Nokia 6280, USB card reader in Windows)
when it was inside the N800 and I was using MaemoMapper. Suddenly the card just
died in the middle of use and hasn't been able to use since then...
Comment 10 Andrew Steele 2007-05-05 16:58:30 UTC
I'm also experiencing the same problem.

Details: N800, I have the March 2007 update, and the SDHC patched kernel. Card
is a Corsair, Class 2 SDHC, 4Gb Card.  I'm assuming by the number of people
mentioning 4Gb cards there must be many using the patched kernel as the
(normal) SD spec only supports upto 2G.

I've taken the card out of the N800 and put it into a PC and run fsck.vfat over
it.  I'll list some of the errors below.  But a couple of observations:
1. I rarely plug my N800 into a PC.  It's after doing that that the corruption
has occured.  Is it possible the problem could be relating to not switching
between a USB Mass storage device for the PC and the SD storage when used by
the N800?
2. As can be seen from the following errors, is there a problem with the
handling of long filenames?  I somehow suspect this isn't the case as I can't
see the particular kernel component needing to be N800 specific so I'd assume
that if such a bug did exist it would have long been discovered on some other
platform.
3. As I was doing the cutting and pasting something else became apparent.  In
my terminal window I was seeing:
   Short name         .    may have changed
But when I pasted it below I got: 
   Short name ��������.��� may have changed
Is there some sort of ASCII to UTF-8 or codepage stuff not being done
correctly?

A sample of the errors (I've renamed some files/directories in these
cut-and-paste samples for privacy reasons). I've only included one of each type
and put "---" to separate each error:

---
/path/to/dir1
  Contains a free cluster (302663). Assuming EOF.
Wrong checksum for long file name "lab_7_30.mp3".
  (Short name ��������.��� may have changed without updating the long name)
1: Delete LFN
2: Leave it as it is.
3: Fix checksum (attaches to short name ��������.���)
? 2
---
/path/to/dir2
  Has a large number of bad entries. (64/95)
Drop directory ? (y/n) n
/path/to/dir2/��������.���
  Bad file name.
1) Drop file
2) Rename file
3) Auto-rename
4) Keep it
? 4
---
/path/to/dir2/��������.���
  Duplicate directory entry.
  First    Size 3391232 bytes, date 05:09:36 Sep 02 2006
  Second   Size 988160 bytes, date 05:09:36 Sep 02 2006
1) Drop first
2) Drop second
3) Rename first
4) Rename second
5) Auto-rename first
6) Auto-rename second
? 2
---
/path/to/dir2/��������.���
  Directory has non-zero size. Fixing it.
/path/to/dir2/��������.���
  Start cluster beyond limit (18446744073709551615 > 865179). Truncating file.
---
/path/to/dir3
  Has a large number of bad entries. (64/110)
Drop directory ? (y/n) n
---
Reclaimed 14947 unused clusters (61222912 bytes).
Free cluster summary wrong (27551 vs. really 42498)
1) Correct
2) Don't correct
? 2
Leaving file system unchanged.
/dev/sdg1: 5559 files, 822680/865178 clusters
Comment 11 Andrew Steele 2007-05-05 17:07:06 UTC
After hitting commit I realised I should have explained one bit more clearly.

Quoting my previous entry:

   I was seeing:
      Short name         .    may have changed
   But when I pasted it below I got: 
      Short name ��������.��� may have changed

The what I was seeing entry has 8.3 spaces.
In the second, pasted, line I'm seeing 8.3 of the UTF unknown code symbol, i.e.
Black diamond with white question mark in it.

I realised my previous post may have confused anyone who has their browsers
setup with a better font selection than I do.
Comment 12 Helmuth Breitenfellner 2007-05-18 18:15:52 UTC
I used the (unsupported, I know) "boot from MMC" on a SanDisk SD 1GB plus (the
one with integrated USB connector), in the internal slot.
It worked quite well. But then after some hours the device froze and did
not react. I gave it more that 10 minutes to 'recover' without any reaction.
So I had to power it off.
After power-off the card was physically (?) damaged: from the USB-connector no
write-access was possible any more, including 'fdisk', mke2fs, and the 'famous'
Panasonic SD-formatter.
Comment 13 Andrew Steele 2007-05-18 19:47:14 UTC
I'd like to add to Helmuth's comment.  I have had a similar experience.  As
well as the card I mentioned in my earlier post, I also have a SanDisk SD 2GB
plus, which I had in the external slot.  It worked for a while then became
readonly.  I then tried to fix it in my PC.  The card seems to have now failed
and no write access was possible any more.

I'd figured I'd received a bad card so I was planning on sending it back for
replacement.  It is possible the N800 could have caused the problem?
Comment 14 Geoff 2007-05-20 10:05:06 UTC
I've just had the same problem on a 2GB Transcend card in the removable slot.
Perhaps this will help reproduce:I was untar'ing a largish file (python html
docs), while it was doing this the unit screen went black (power-saving). Came
back and checked it and it claimed to have had an I/O error. File system
appeared to have 'vanished'. Couldn't umount the filesystem (claimed it was
'busy'). Powered-off. Checked card on my PC and it wasn't good (fixed using
fsck.vfat). Able to use the card on on the PC without any I/O errors (large
unpacks/delete/etc). Put in back into N800 - now both my cards mount read-only
(although the other appears fine). I can remount them rw but it's a pain in the
butt. Fix please :-).
Comment 15 Geoff 2007-05-21 04:16:27 UTC
(In reply to comment #14)

I have some stuff to add to my previous comment. It seems that it is particular
directory tables getting corrupted. In one case I've "lost" (as far as the n800
is concerned) the top level directory on the card, still had a window open on
another directory and was able to work in it (recovered top level directory and
had access to lower level directory again).

I've been able to repair the card directory structure externally (using
fsck.vfat), return card to n800 and get it to mount read-write. After repair,
it initially seems to mount read-only, as root I re-mount it as read-write,
then manually unmount it and reboot the n800. After the boot it appears
read-writable again. Strange behaviour. 

I've also installed fsck.vfat for the n800 - so hopefully I'll be able to do
local repairs.
Comment 16 Matti Savolainen 2007-07-02 21:26:20 UTC
(In reply to comment #9)
> Just confirming that I'm suffering this same issue. My 4GB SD card has
> corrupted numerous times since my purchase of the N800 in February. This also
> happened with 1GB RS-MMC card that I used with my previous 770 without any
> issues! The icing of the cake is that one 2GB SD card broke completely (can not
> be detected with any hardware: N800, Nokia 6280, USB card reader in Windows)
> when it was inside the N800 and I was using MaemoMapper. Suddenly the card just
> died in the middle of use and hasn't been able to use since then...
> 
Reporting my experience with my new Patriot 8GB Class 4 SDHC card. So far after
about a month of usage I have not seen this problem reoccurring. The card is
mounted in the internal memory card slot. It looks like the memory cards
quality plays at least some role? Some work good and some don't? Should a list
of certified memory cards (or list of cards that have had issues) be created?
Comment 17 Tim Samoff (reporter) maemo.org 2007-07-02 21:33:19 UTC
> Should a list of certified memory
> cards (or list of cards that have
> had issues) be created?

There are a few lists like this on the ITT forum, but they're pretty hard to
sift through... Could an admin-moderated list like this be created somewhere on
the Maemo site?
Comment 18 Jake Kunnari 2007-07-04 15:49:19 UTC
*** Bug 1197 has been marked as a duplicate of this bug. ***
Comment 19 Jake Kunnari 2007-07-06 13:29:37 UTC
Fixed in latest IT OS 2007.
Comment 20 Michael 2007-07-08 00:52:53 UTC
(In reply to comment #12)
(In reply to comment #13)

Hi,
I am using the new firmware 4.2007 with sdhc support (N800) and bought
therefore two transcend 8GB sdhc class 6 cards. I used the first one
in the internal slot without problems. But the second one in the
external slot made some trouble. I downloaded a 700MB file from a local
ftp server to this sdhc card (with wget). After ca. 28% I got an input/output
error and the card was not accessible anymore. This card was also not
accessible
through my sdhc cardreader (PC). Panasonic SDformatter could not recognize this
card anymore! After testing the second card in the external card slot I got
the same problem. I thought that the two sdhc card were incorrectly. But
I could test a third sdhc card with the same result...
Until now I have three corrupted SDHC cards that could not be recognized
anymore!

What is going on here? Defect external slot? Or a Software failure?

@Andrew Steele, Helmuth Breitenfellner: how did you solve your problem with the
corrupted sd card? I think that could be the same problem!

I am reopening that bug. If you think that this is not related to the
originally
bugreport, close this again and I will create a new bugreport.
Comment 21 Matti Savolainen 2007-07-08 03:00:18 UTC
(In reply to comment #19)
> Fixed in latest IT OS 2007.

Doesn't look like this issue is fixed! Just today I corrupted my 8GB Patriot
SDHC card. I'm using the latest ITOS (version 4.2007.26-8). Card was mounted in
internal slot. I was using Maemo Mapper and it suddenly wasn't able to load the
map from memory card. When it tried to load it from internet it could not save
it to the memory card because it was set to write only.

Maybe I should try to patch the kernel with the SDHC patch that was needed with
the previous firmware? I was able to use this same card for several weeks
without any corruption issues using this patch. (As a added benefit it is also
about 2x faster in write and read speeds!)

Suggest leaving this bug reopened for newest OS. It has to be either software
or hardware issue. If no software fix is found I'm forced to send this unit to
Nokia for repair/replacement.
Comment 22 Neil MacLeod maemo.org 2007-07-08 03:04:22 UTC
(In reply to comment #21)
> 
> Maybe I should try to patch the kernel with the SDHC patch that was needed with
> the previous firmware? I was able to use this same card for several weeks
> without any corruption issues using this patch. (As a added benefit it is also
> about 2x faster in write and read speeds!)
> 
I've raised a query about this performance discrepancy in bug #1426 - I had
thought the performance may have been reduced in order to combat this
corruption issue, but that clearly isn't the solution (unless performance needs
to be reduced even further - eek).
Comment 23 Tuape 2007-07-08 13:48:49 UTC
Hi,
The same thing happened to me while creating a backup when upgrading to latest
firmware. Before that I have already corrupted 2 micro SD cards (2 GB).

Details: I am using Sandisk 2GB micro SD cards with adapter on the "external"
slot. I have quite many these exact same SD cards in use on various devices
(Different Nokia mobile phones, Pocket PC handheld, Digital camera and N800)
and N800 is the only device that seems to corrupt these cards occasionally. I
don't believe it's an issue with SD card quality.
The cards seem to get *really* corrupted. They can be read using windows, but
you can't copy data from/to card. The card can't even be re-formatted in any
device I have tried with so far.

Is there any way to get these cards to work? I don't want to be buying new
cards every month since 2GB should be completely supported as far as I know.
Comment 24 Michael 2007-07-08 15:49:52 UTC
(In reply to comment #23)
> Is there any way to get these cards to work? I don't want to be buying new
> cards every month since 2GB should be completely supported as far as I know.

You can try "Panasonic sdformatter". This tool is able to perform a low level
format of sd cards.
Comment 25 Tuape 2007-07-08 19:59:08 UTC
Unfortunately doesn't help...

Seems to happen only for cards on the external slot. At least for me this has
happened when a big file was being saved / downloaded to the drive (~45MB
backup / ~40+ MB Podcast)
Comment 26 Neil MacLeod maemo.org 2007-07-08 20:04:36 UTC
I've now got a corrupt FAT filesystem on /media/mmc2 (external card) which is a
4GB Class 2 SDHC Transcend card - this card (in fact, 4 cards - 2x 4GB
Transcend SDHC C2 and 2x8GB Transcend SDHC C2 on two N800s) _never_ had any
problems with the old SDHC patch on 3.2007.10-8. Maybe this problem and the new
firmware is just a coincidence, but I suspect not...

With 4.2007.26-8, I'm seeing the following errors in dmesg:

[   73.171600] FAT: Filesystem panic (dev mmcblk1p1)
[   73.171630]     fat_bmap_cluster: request beyond EOF (i_pos 134188)
[   73.223205] FAT: Filesystem panic (dev mmcblk1p1)
[   73.223236]     fat_bmap_cluster: request beyond EOF (i_pos 131074)
[   73.223327] FAT: Filesystem panic (dev mmcblk1p1)
[   73.223358]     fat_bmap_cluster: request beyond EOF (i_pos 131074)
[   73.223388] FAT: Filesystem panic (dev mmcblk1p1)
[   73.223419]     fat_bmap_cluster: request beyond EOF (i_pos 131074)
[   73.223480] FAT: Filesystem panic (dev mmcblk1p1)
[   73.223510]     fat_bmap_cluster: request beyond EOF (i_pos 131074)
[   73.223541] FAT: Filesystem panic (dev mmcblk1p1)
[   73.223571]     fat_bmap_cluster: request beyond EOF (i_pos 131074)
[  101.704925] FAT: Filesystem panic (dev mmcblk1p1)
[  101.704986]     fat_get_cluster: invalid cluster chain (i_pos 0)
[  108.872802] FAT: Filesystem panic (dev mmcblk1p1)
[  108.872863]     fat_get_cluster: invalid cluster chain (i_pos 0)

Removing and re-instering the card results in more panics, at different
positions - below is just a sample, there are dozens of messages:

[  241.198822] FAT: Filesystem panic (dev mmcblk1p1)
[  241.198852]     fat_bmap_cluster: request beyond EOF (i_pos 5450774)
[  241.257293] FAT: Filesystem panic (dev mmcblk1p1)
[  241.257354]     fat_bmap_cluster: request beyond EOF (i_pos 5450778)
[  241.257415] FAT: Filesystem panic (dev mmcblk1p1)
[  241.257446]     fat_bmap_cluster: request beyond EOF (i_pos 5450778)
[  241.257507] FAT: Filesystem panic (dev mmcblk1p1)
[  241.257537]     fat_bmap_cluster: request beyond EOF (i_pos 5450778)

Mounting the card in Windows XP SP2 and performing a disk check reported no
errors, and I was able to reformat the card within the N800 so at least the
card wasn't killed.
Comment 27 Michael 2007-07-09 18:49:36 UTC
(In reply to comment #20)
Addition to my dead sdhc cards:

dmesg output when I remove my functional SD card and insert a destroid SDHC one
(external slot):

[37995.209472] mmci-omap mmci-omap.1: cover is now open
[37995.211273] mmci-omap mmci-omap.1: command timeout (CMD8)
[37995.224700] mmci-omap mmci-omap.1: card status error (CMD13)
[37995.708190] mmci-omap mmci-omap.1: command timeout (CMD8)
[37995.708251] mmci-omap mmci-omap.1: command timeout (CMD8)
[37996.209869] mmci-omap mmci-omap.1: command timeout (CMD8)
[37996.710876] mmci-omap mmci-omap.1: command timeout (CMD8)
[37997.206451] mmci-omap mmci-omap.1: command timeout (CMD8)
[37997.206512] mmci-omap mmci-omap.1: command timeout (CMD8)
[37997.706451] mmci-omap mmci-omap.1: command timeout (CMD8)
[37997.706512] mmci-omap mmci-omap.1: command timeout (CMD8)
[37997.714050] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.714080] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.714782] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.714813] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.715515] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.715545] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.716247] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.716278] mmci-omap mmci-omap.1: command timeout (CMD13)
[37997.743621] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
[37998.205200] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[37998.299072] mmci-omap mmci-omap.1: command timeout (CMD8)
[37998.304199] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
[38024.580535] mmci-omap mmci-omap.1: cover is now closed
[38024.581176] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[38024.682647] menelaus: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val
0x29)
[38027.091674] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)



As you can see, the card isn't even recognized by the N800.
I have to assume that this card (and the two others) is physically damaged.
Same result with Ubuntu and HAMA sdhc cardreader. WinXP also could not
recognize
these cards anymore.

Would be nice to get a statement from a Nokia employee. Could this only be
hardware
related or is there hope that a software update could fix this bug?
Who will pay for my broken SDHC cards?
Comment 28 JK 2007-07-10 05:07:06 UTC
OS 2007 3.2007.10-7 killed my quality SanDisk 2GB miniSD card last week. I had
in the external slot. It is now read-only and i cannot format it with N800,
Windows, Linux or digicam. Couple of days ago i mailed to the local store and i
get new one because of guarentee.
Comment 29 Jake Kunnari 2007-07-10 12:57:33 UTC
Alias updated.
Comment 30 BarneyC 2007-07-11 23:02:45 UTC
Aggghhhh

Downloading 2 40Mb(ish) podcasts to 8Gb Class6 Transcend card in external slot
with latest firmware.

SD card now dead.  Not funny, not happy and not in possession of NZ$154 to buy
a new one :o((

Nokia this firmware problem sucks - I was running this card for nearly 3 months
with not one problem until the update.
Comment 31 Tim Samoff (reporter) maemo.org 2007-07-11 23:07:36 UTC
Please keep in mind that this was an issue well before the latest update -- you
were probably just lucky until now.
Comment 32 Michael 2007-07-11 23:38:40 UTC
(In reply to comment #31)
> Please keep in mind that this was an issue well before the latest update -- you
> were probably just lucky until now.
> 
You're right! The Problem is not new.     
A reason more that we receive an official statement.
Would be great to know if its only a software problem or if the
hardware is also concerned.
Comment 33 Steve Elliott 2007-07-14 11:25:48 UTC
I have a 2GB Kingston MMC Card in the External Slot. It works fine with the v3
firmware, but as soon as I upgrade to v4 it appears as corrupt. If I reflash
back to v3, the card is detected and, as far as I am aware, I can read/write to
it just fine. The same card can also be read/write from my 770, my Nokia E60
phone and a Windows XP PC. It just seems to be the v4 firmware that can't mount
it in the External Slot. I don't think it works in the Internal Slot with the
v4 firmware either, but I have rechecked it since going back to the v3
firmware. It's not specific to one particular 2GB card either; I have a second
one in the 770 and that behaves in exactly the same way with the v4 firmware.
Comment 34 David White 2007-07-14 14:45:56 UTC
I upgraded to the latest (4.2007.26-8) firmware and purchased an 8GB Class 6
Transcend SDHC card to use with it yesterday.  As with other comments here, I
started copying 1.17GB of music files from the internal card to this one.  The
operation appeared to hang 75% through the process.  After waiting I power
cycled, and on restarting the card was declared corrupted by the file manager. 
I was then able to reformat the card via the file manager and everything was
okay again.  However later, after connecting the N800 to a PC the drive was
reported as unreadable by the PC, and was again unreadable by the N800 file
manager.  I've tried reformatting several times but it no longer works.  Now in
both the external and internal slot 'no memory card inserted' is reported. 
Although I don't have a PC SDHC card reader to confirm, it looks like my SDHC
card is dead.
Comment 35 Neil MacLeod maemo.org 2007-07-14 17:40:58 UTC
In 4.2007.26-8, Nokia have _not_ used all of the patches[1] that were applied
to 3.2007.10-7... since the Nokia changes appear to be causing more problems
perhaps Nokia should consider going with what had been working well for 3+
months? Or discussing the patch with the author?

Since this firmware is causing hardware (card) failures to end users, I'm
getting _really_ annoyed at the lack of Nokia visibility surrounding this
problem.

1. http://intr.overt.org/blog/?p=52
Comment 36 Quim Gil nokia 2007-07-15 01:55:04 UTC
Hi, 

We are doing internal testing in order to determine the cause of this issue and
provide  a solution. There is no a conclusion so far. We acknowledge that some
users are getting in trouble with some cards but in the meantime we have done
intensive testing on cards and processes that haven't caused or suffered any
problem.

Please keep reporting at http://bugs.maemo.org/show_bug.cgi?id=1204 any details
about affected cards: the specific type of card affected and the processes you
were doing when you encountered the problem and before. These details are more
than helpful to define the problem and fix it.

We will communicate here and in the bug report any progress.
Comment 37 Marius Gedminas 2007-07-15 18:55:24 UTC
I have a 512 MB SanDisk card (model AX0502WG) that I used in a Palm TX for a
number of years, then in my N800's external slot for several months.  It
suddenly stopped working one day -- I noticed when the media player showed a
smaller total number of songs one day.  It doesn't work any more in my USB card
reader either.

Here's the output of dmesg when I insert that card into the external slot of
the N800:

[12412.952056] mmci-omap mmci-omap.1: cover is now open
[12412.952636] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[12413.092926] mmci-omap mmci-omap.1: command timeout (CMD8)
[12413.092987] mmci-omap mmci-omap.1: command timeout (CMD8)
[12413.093353] mmci-omap mmci-omap.1: card status error (CMD55)
[12413.094696] menelaus: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val
0x29)
[12413.155426] mmci-omap mmci-omap.1: command timeout (CMD8)
[12413.155456] mmci-omap mmci-omap.1: command timeout (CMD8)
[12413.155822] mmci-omap mmci-omap.1: card status error (CMD55)
[12415.153991] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
[12416.952056] mmci-omap mmci-omap.1: cover is now closed
[12416.952606] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[12417.053863] mmci-omap mmci-omap.1: command timeout (CMD8)
[12417.053924] mmci-omap mmci-omap.1: command timeout (CMD8)
[12417.057983] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
[12449.967681] mmci-omap mmci-omap.1: cover is now open
[12449.968353] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[12450.092926] mmci-omap mmci-omap.1: command timeout (CMD8)
[12450.092987] mmci-omap mmci-omap.1: command timeout (CMD8)
[12450.097045] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
[12453.432983] mmci-omap mmci-omap.1: cover is now closed
[12453.433593] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[12453.530426] mmci-omap mmci-omap.1: command timeout (CMD8)
[12453.530487] mmci-omap mmci-omap.1: command timeout (CMD8)
[12453.530853] mmci-omap mmci-omap.1: card status error (CMD55)
[12453.532196] menelaus: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val
0x29)
[12453.592956] mmci-omap mmci-omap.1: command timeout (CMD8)
[12453.593017] mmci-omap mmci-omap.1: command timeout (CMD8)
[12453.593383] mmci-omap mmci-omap.1: card status error (CMD55)
[12455.940368] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
Comment 38 Seppo Korpelainen 2007-07-16 21:40:24 UTC
2 dead Sandisk SD 2GB cards after 1 month use in external slot.
The original Nokia 128MB cards seem to be working ok still.
Comment 39 Sean Cross 2007-07-17 02:52:23 UTC
Today, I experienced a similar problem.  I have a Patriot Class 6 8GiB SDHC
card that seems to mostly work fine.  I'm running the 7.2007 firmware that just
came out.

I have about 470 MiB of music data on a 2 GiB SD card that I want to copy to
the 8 GiB SDHC card.  Whether I use osso-xterm ("cp -r /dev/mmc[12]/Music
/dev/mmc[21]/") or File Manager to copy, eventually I get "cp: write error:
Input/output error", and all of the files on the card disappear.  In order to
get the files back, I have to remove / insert the card again.

It seems to always happen at the same place during the copy.

I was able to connect the N800 to my Mac, and copy the files to the memory card
via USB, so I'm not quite sure where the fault lies.
Comment 40 Ryan Zachry 2007-07-17 21:12:31 UTC
While downloading a podcast, with Opera, to the external card (SanDisk 1GB) the
battery gave out. This corrupted the card with odd filenames, file sizes and
can no longer be written to or formatted.

Hopefully this is repeatable for your testing.
Comment 41 akronberg 2007-07-18 04:23:49 UTC
Ever since upgrade I had to restart n800 after every usb file transfer. But
today finaly got it corrupted after a normal operation. At first it appeared as
read-only, and became empty after restart.
Patriot 8gb sdhc card.
Comment 42 Tim Samoff (reporter) maemo.org 2007-07-19 16:40:27 UTC
I just transfered less than a gig to my External card and about 1 MB to my
internal card via USB from WinXP and it rendered both cards read-only.

These are both 4 GB Transcend cards that were formatted by the N800 using the
latest firmware.
Comment 43 Tuape 2007-07-21 11:37:09 UTC
Happened to me again, fourth time!

This time it was after taking backup again. This is shortly what happened:
- I did have existing backup "Backup" on external drive
- I took another backup, "Backup01". The backup was finished successfully.
- I didn't do much else with the device that evening. Maybe read some emails +
general browsing.
- Next day I tried to open some PDF's from the external drive. They were all
corrupted. The same with podcasts/MP3's. Otherwise the drive could be accessed
and files seen, but all of them were corrupted. I did look at the backup taken
yesterday; there was only one 1kb file, but not folder nor the zip files for
"Backup01".
- I turned the device off and on again. Now the whole drive could not be
accessed.
- I turned the device off and tried with Windows: The card is really corrupted
(again) and can't be re-formatted.

I am using 2GB Sandisk microSD with Sandisk microSD/TransFlash Adapter.
Comment 44 menozero 2007-07-24 17:39:52 UTC
It happened twice to me, both times with a SanDisk Ultra II SD 2GB card in the
removable slot.  I have no solutions or tricks to offer, just a pair of sad
stories...
The first time the N800 finished the battery during a file transfer, leaving
the card "broken", that is un-formattable even on a notebook using the SanDisk
tools; I felt guilty but I managed to get a new card.  DOA, I imagined.
The second time was yesterday, some weeks after putting in the firmware 4.2007.
 Filling the card with some music, one of the last files gave me an error, then
Canola (and later Media Player) gave me "Error" for every file, then I noticed
that the File Manager showed empty directories but the same small free space
("du" in the terminal showed 170MB used but 40MB free in a 2GB card), then it
stopped working and it was greyed out in the File Manager.
Now I have the same problems, I can't format it, and I don't think I can
persuade the shop after some months that is was another DOA...  Sigh...
Comment 45 Claus 2007-07-24 17:55:06 UTC
Hi,
was also hit by this bug (newest OS with skype)

I was able to recover my Card with the Card Wiper from here:
http://www.datarescue.com/photorescue/download.htm
A Card test with this tool reported a lot of errors, but after using the wipe
functionality, the next test run was fine.
So then just formated the card and for now the card is usable again.
Hope that this helps others to recover there memory cards
Comment 46 Tim Wegener 2007-07-28 05:47:54 UTC
I have this problem with a 2GB Apacer MicroSD card. I've been using it for
months, but the problem has only become apparent in the last week or so.
Comment 47 jiippana 2007-07-28 12:48:39 UTC
My Kingston 4 GB  class 4 SDHC card is read-only in my n800. 
Windows can't see the contents of the card.

I intensively downloaded maps using maemo mapper when the problem occured.
Comment 48 Michael 2007-07-28 13:00:23 UTC
(In reply to comment #36)
> Hi, 
> 
> We are doing internal testing in order to determine the cause of this issue and
> provide  a solution. There is no a conclusion so far. We acknowledge that some
> users are getting in trouble with some cards but in the meantime we have done
> intensive testing on cards and processes that haven't caused or suffered any
> problem.
> 
> Please keep reporting at http://bugs.maemo.org/show_bug.cgi?id=1204 any details
> about affected cards: the specific type of card affected and the processes you
> were doing when you encountered the problem and before. These details are more
> than helpful to define the problem and fix it.
> 
> We will communicate here and in the bug report any progress.
> 
Quim, any news?
If the developers are not able to reproduce this, it would be helpful
to get some instructions what information we should collect if this problem
occurs. I think dmesg output is not enough! Perhaps we need a debugging kernel
that provides more info.

Perhaps its really a hardware issue...
Comment 49 Arben 2007-07-29 01:20:03 UTC
Another corruption report: n800, latest OS, new ADATA 8GB class 6 SDHC card
*only ever used in N800*. At least all filenames in directory listings
corrupted while writing to a dozen files (gpodder podcast update). N800 on
mains power. Card OK after format.
Comment 50 Matti Savolainen 2007-07-29 03:28:19 UTC
After updating to 4.2007.26.10 and using 8GB Patriot Class 4 SDHC card memory
card got corrupted after about a week from firmware update. Corruption occured
when on the road trip using MaemoMapper. (Previously I had previous firmware
and the SDHC kernel patch. I was using that setup about 6 weeks without any
issues.) I have always used the card in the internal memory card slot.

A week ago I patched the latest MMC kernel
(http://intr.overt.org/4.2007.26-mmc-kernel/mmc-kernel-4.2007.26.bin) and have
been using the N800, trying to reproduce the failure:
- Using MaemoMapper to download map tiles using WiFi connection while there was
a simultaneous >300MB video file copy from one directory to another on the
internal card running on the background. Also a browser was open and media
player was streaming an internet radio station (shoutcast).
- Using MaemoMapper to download map tiles using WiFi connection while copying
simultaneously >300MB video file from internal memory card to external memory
card (4GB non-SDHC).
- Copy over 200MB worth of MaemoMapper map files (total over 1700 directories
with total of over 27000 individual files) from PC to N800 using USB
connection.
- Delete the aforementioned files from memory card using N800 File Manager.
- Copy the files again from the PC to N800 using USB connection.
- After this point I was no longer able to run windows checkdisk utility: When
checking the "Fix automatically file system errors" the disk check can not be
completed. The N800 also lights up its screen while this happens and Windows
can no longer see any files on both of the N800 memory cards. If USB cable is
disconneced the N800 mounts the cards back and all the files can be seen in
N800 file manager. If USB cable is reconnected to PC it can see all the files
again. Dmesg log does not show any file system panic. The memory card is not
corrupted, but it does not appear to work normally either...

Suggestion how to troubleshoot this issue: Copy big amounts of small files back
and forth from the memory card to PC. After each cycle run diskcheck from
windows to see if it can be completed.

Additional note: In my case the corruption has almost always happened when
using MaemoMapper. To be more specific, when the N800 has been connected to
iBlue GPS receiver via bluetooth and when N800 is waking up from "sleep" by
tapping the screen to light up the display. During its sleep mode it has been
constantly listening the iBlue GPS coordinates and also loading map tiles from
the memory card. Then just sometimes it happens that the memory card some map
files are corrrupted and can not be red. At this time the card is mounted as
read only. I do not recall this happening ever when the MaemoMapper was in full
screen mode when it keeps the display always lit. Only when it is in normal
window mode when it allows to dim the screen. (And enter in some sort of sleep
mode?)
Comment 51 Tony Maro 2007-07-31 00:58:42 UTC
I haven't had this problem... yet... but I did have a similar situation that
may be relevant.

When Dell first released the Axim PocketPC's, they offered a bundle with a 1 GB
Sandisk SD card. 

They had identical issues.

It turned out, the Sandisk cards package/label were causing minor shorts inside
the socket.  Dell swapped all 5 cards I bought with other brands to fix the
problem, and I assume did a minor adjustment to their own hardware later to
prevent future issues.

I wonder if this is something similar.  I see a few different brands listed,
but there's really only a few manufacturers.  I wonder if all brands exhibiting
this problem are made in the same factory and have some physical or electrical
difference that allows this to happen.

That would explain some people commenting that the "quality" of the card seems
to make a difference - they were made on a separate line.
Comment 52 Andrew Bilsbury 2007-07-31 04:43:41 UTC
I was on the phone with Nokia Support today about another issue.  I mentioned
that I had 2 Transcend SD cards and one Sandisk SD card go bad on me while
using in the N800 and the support person said that only Nokia SD cards were
supported.
Is this really true?!
Comment 53 Gabriel Schulhof nokia 2007-07-31 15:52:32 UTC
Hi!

I have experienced 2 memory card corruption incidents:

1.
I tried upgrading to 4.2007, but I reverted back to 3.2007, for the following
reason:

I have a "2GB MMC Mobile Dual Voltage Kingston" card, and, upon flashing to
4.2007, it is considered corrupted. However, flashing back to 3.2007, it works
again.

While using 3.2007, I plugged it into my desktop via USB and ran 

cat /proc/partitions 

on my desktop. It showed /dev/sdc and /dev/sdc1.

However, after flashing to 4.2007 and plugging it into my desktop and running

cat /proc/partitions

it only shows /dev/sdc. There is no longer a /dev/sdc1.

2.
Earlier this year (Easter weekend), during a road trip when the N800 was
plugged into my car via a cigarette-lighter-based charger, I was running
maemo-mapper with the maps stored on a "2GB SanDisk Ultra II" (the one that
folds to reveal a USB jack). The N800 went into a reboot loop, and after I
recovered it (without flashing!), the card was useless. It was corrupted, and
unformattable in either the N800, my Linux desktop, or a Windows computer.
Comment 54 Tony Maro 2007-08-01 18:41:54 UTC
Another user kills a card.
Wahlau reports killing a 2 GB Sandisk card on his blog:
http://www.wahlau.org/crash_and_burn_one_sd_card_down

He also reports his battery went dead just prior to the card corruption, I see
a trend with other people on this possibility.
Comment 55 Eero Tamminen nokia 2007-08-02 12:40:14 UTC
> The N800 went into a reboot loop, and after I recovered it (without flashing!),
> the card was useless. It was corrupted, and unformattable in either the N800,
> my Linux desktop, or a Windows computer.

Do you mean that the partitions cannot be formatted (in which case
the partition table could be corrupted) or that the card is not
recognized at all (so that you could e.g. repartition it with [c]fdisk)?
Comment 56 Michael 2007-08-02 16:57:42 UTC
(In reply to comment #55)
> Do you mean that the partitions cannot be formatted (in which case
> the partition table could be corrupted) or that the card is not
> recognized at all (so that you could e.g. repartition it with [c]fdisk)?

Eero, I am not the reporter of comment #53, but I used three SDHC cards that
are not recognized anymore (see comment #20,
https://bugs.maemo.org/show_bug.cgi?id=1204#c20)! Recognition test was done in
N800, Ubuntu 7.04 and WinXP. I also used a SDHC Cardreader with the same
result.
For dmesg output (N800 with corrupted sdhc card) look at comment #27
(https://bugs.maemo.org/show_bug.cgi?id=1204#c27)

So it isn't possible to recover these cards with [c]fdisk or another tool!
Comment 57 John Feller 2007-08-02 17:33:21 UTC
I lost an 8GB Transcend Class 6 after less than a day of use.  Started with
some corrupted file names while transferring MaemoMapper map files over USB
from a Windows PC.  Now the card isn't recognized at all in either SD slot by
the N800.

This N800 is brand new, so I only used the default firmware (with no SDHC
support) for a little while before flashing to the latest.  The 8GB card was
recognized and worked fine for a while, then under heavy file transfer activity
the corruption started occurring.  The 8GB card was in the internal slot, and I
never removed it while the N800 was powered up.  

After trying to 'sfdisk' and re-create vfat and ext2 filesystems on it for a
while, on one reboot a device file no longer showed up for it.  It has been
that way ever since, in both the external and internal slots.  An old 256MB
card works fine in both slots.  In fact, that 256MB card has been used quite
heavily (videos and MaemoMapper again) and has had no problems so far.  But the
8GB card doesn't even show up.  I do not yet have an SDHC-compliant card
reader, so have no other way to test the card.  An SDHC reader is on the way,
so when that comes in I will see what it says.

As an experiment, I flashed the patched kernel from
"http://intr.overt.org/4.2007.26-mmc-kernel".  No difference in card
recognition, but at least I get some 'dmesg' debug output now.

Here is 'dmesg' output for my device boot, grepped for references to 'mmc'. 
The patched kernel is being used, the working 256MB card is in the internal
slot (mmc0), and the non-recognized 8GB SDHC card is in the external slot
(mmc1).

Nokia-N800-26:~# dmesg | grep -i mmc
[    3.446960] mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing
0
[    3.448089] mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing
0
[    3.448455] mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing
0
[    3.448669] menelaus: Setting voltage 'VMMC' to 3100 mV (reg 0x0a, val 0xf8)
[    3.461700] mmci-omap mmci-omap.1: cover is now closed
[    3.476318] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[    3.491943] mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0
timing 0
[    3.523132] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[    3.539428] mmci-omap mmci-omap.1: command timeout (CMD8)
[    3.539489] mmci-omap mmci-omap.1: command timeout (CMD8)
[    3.539825] mmci-omap mmci-omap.1: card status error (CMD55)
[    3.540527] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 16 width 0
timing 0
[    3.541046] menelaus: Setting voltage 'VMMC' to 2800 mV (reg 0x0a, val 0x78)
[    3.554595] mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 16 width 0
timing 0
[    3.561706] mmci-omap mmci-omap.1: cover is now closed
[    3.585815] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 16 width 0
timing 0
[    3.601959] mmci-omap mmci-omap.1: command timeout (CMD8)
[    3.601989] mmci-omap mmci-omap.1: command timeout (CMD8)
[    3.602386] mmci-omap mmci-omap.1: card status error (CMD55)
[    3.921356] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 0
timing 0
[    3.924133] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 0
timing 0
[    3.925994] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 0
timing 0
[    4.199340] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 2
timing 0
[    4.199523] mmcblk0: mmc0:9c8f SH256 249856KiB
[    4.199798]  mmcblk0: p1
[    4.311340] mmc1: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing
0
[    4.343566] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[    4.359191] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0
timing 0
[    4.390441] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[    4.407440] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 15 width 0
timing 0
[    4.421905] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 15 width 0
timing 0
[    4.453094] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 15 width 0
timing 0
[    7.018127] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 15 width 0
timing 0
[    7.019287] mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing
0
[    7.031890] mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 16 width 2
timing 0
[    7.033691] mmci-omap mmci-omap.1: command timeout (CMD8)
[    7.033752] mmci-omap mmci-omap.1: command timeout (CMD8)
[    7.039520] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 2
timing 0
[    7.041961] mmci-omap mmci-omap.1: card status error (CMD13)
[    7.042419] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 2
timing 0
[   23.615386] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 2
timing 0


Here is 'dmesg' output when I pull out, then re-insert the 8GB card in the
external slot while the N800 is powered up:

[ 1225.887756] mmci-omap mmci-omap.1: cover is now open
[ 1225.887847] mmc1: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing
0
[ 1225.888397] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[ 1225.937530] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[ 1225.953155] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0
timing 0
[ 1225.984375] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[ 1226.000946] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 15 width 0
timing 0
[ 1226.001647] menelaus: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val
0x29)
[ 1226.015563] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 15 width 0
timing 0
[ 1226.046875] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 15 width 0
timing 0
[ 1228.408935] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 15 width 0
timing 0
[ 1228.410247] mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing
0
[ 1228.410736] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)
[ 1234.905395] EAC mode: play enabled, rec enabled
[ 1237.390289] mmci-omap mmci-omap.1: cover is now closed
[ 1237.390380] mmc1: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing
0
[ 1237.390899] menelaus: Setting voltage 'VDCDC3' to 3300 mV (reg 0x07, val
0x39)
[ 1237.400512] EAC mode: play disabled, rec disabled
[ 1237.421966] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[ 1237.437530] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0
timing 0
[ 1237.468750] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0
timing 0
[ 1237.485321] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 15 width 0
timing 0
[ 1237.486022] menelaus: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val
0x29)
[ 1237.499938] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 15 width 0
timing 0
[ 1237.531250] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 15 width 0
timing 0
[ 1239.893310] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 15 width 0
timing 0
[ 1239.894653] mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing
0
[ 1239.895141] menelaus: Setting voltage 'VDCDC3' to 0 mV (reg 0x07, val 0x01)


Hope this information will help.
Comment 58 rbtest 2007-08-03 07:30:59 UTC
today i encountered a false corruption error message. 

i have two ocz 8gig class 6 sdhc cards... having added the second card 2 days
ago into external slot. 

today when connecting 800 to xp machine only 1 card mounted properly ... i
believe it was the internal card... the external card showed drive letter but
clicking on drive said something like no disk in drive.

i then unplugged the usb cable at which time the 800 showed a corrupt memory
error.

i rebooted (switch off/switch on) the 800 and connected to pc again. both
drives mounted correctly. at this point i ran scandisk on the external sd drive
and no errors were encountered. in fact i dowloaded another 4 or so gigs via
usb since then.

not sure if this helps any but this -might- point to usb host controller issue
as opposed to any physical (erm electrical) read write mechanism.

does the 800 itself interface with external usb controller, and if so is this
different than how it interfaces with internal mmc?

perhaps actual corruptions are symptoms to this root cause ...  

hopefully not too oversimplified but thought id add comment showing early/first
symptoms.

btw i never formatted... just used default fat32... never used external card
reader. did 800 usb mount to xp box twice succesfully before error and have
since successfuly dowload many files in successful host.
Comment 59 Randall Arnold 2007-08-08 16:07:01 UTC
There are some VERY good details provided here by users!  Unfortunate that
there is an issue but at least it's provided a fine example of how the
community can help troubleshoot effectively.

For those concerned about official Nokia communications (on this or in
general), take Quim's comment (#36) verbatim and recognize that they have not
abandoned the subject.

It is my suspicion that more than one variable is involved and a critical
contributing factor may not have yet been introduced in Nokia's internal
environment.  That's why this detailed bug reporting is crucial to a
resolution.  SD card brand, ancillary software, activities at the time of
corruption, etc-- all are important details to include.  Nice work folks. 
Let's hope for a fix soon.
Comment 60 Al Stone 2007-08-13 00:36:48 UTC
Yet another SanDisk Ultra II 2GB bites the dust.  Using latest firmware, with
latest updates (as of 12 Aug 2007).  All I did was login to my n800 via ssh and
then scp ogg files to the device; it was about 56% full, and it probably became
completely full.  The card is now completely useless; I can't even reformat the
thing so far.  I do get the mmci-omap and the timeout errors shown in the
previous reports, too.

Where do I send a reimbursement request?  The card has worked fine for months,
doing exactly the same thing as I was doing today.  Between now and the last
time it worked, I updated the firmware and that's all.  Whatever changed has
now made my SD card completely unusable, without warning.
Comment 61 Tycho 2007-08-15 08:32:03 UTC
I'm not sure if I'm experiencing this problem or not. My 2 GB SD card worked
exactly once in my N800. Once I removed it and re-inserted it, the N800 acted
like it wasn't there. I did not get a corrupt card notice; my N800 told me
nothing.

Then I tried to insert my 128 MB card (that came with the N800 and had been
working fine). It said that card was corrupt. I removed and re-inserted that
card, and I got nothing (just like my brand new 2 GB card).

Luckily both cards still work in my PC. I will test them on my Nintendo Wii
console also.
Comment 62 Tom Hawley 2007-08-16 19:11:28 UTC
I've been hit today. Transcend 8GB Class 6 SDHC in the Internal slot. Early
days a few files corrupted and I managed to fix them with CHKDSK in XP. Since
then CHKDSK hasn't found anything, but a few days ago the dreaded Unformatted
or Corrupt message turned up. On that occasion the N800 happily reformatted it.
A day later the same message appeared again, this time failing to format. I've
yet to try most of the various recovery techniques so haven't given up just
yet.

Most file transfers have been large MP3, ranging 20-60MB, and a few vids in the
100MB range, though I did transfer a +200MB vid yesterday for probably the
first time.

What i'd really like to understand is whether there is any real potential for
physical permanent damage to these cards or whether it's all about scrambled
data/allocation tables on an otherwise undamaged card - obviously physical
damage raises warranty issues.
Comment 63 Tony Maro 2007-08-17 19:12:15 UTC
I'm now seeing problems, but haven't had a total corruption yet.  I have needed
to reboot three times (at various times) to get the internal memory card
recognized.  Just now, I was trying to change my background image to one on the
card.  The preview window for selecting the file loaded a preview of the first
two images on the card and then stopped.  I chose one I wanted, and clicked OK.
 It then told me there was an error setting the background image (I forget the
exact error) so I tried to browse to it again.  This time there was nothing on
the internal card.

I rebooted and things came back to normal - my data was still present.  I've
had similar issues with Maemo Mapper and other apps that would use the memory
extensively.

Internal Card:  Crucial 2 GB (This is the one I've seen problems with.)

External Card:  PNY 1 GB - I rarely use this card, and haven't seen problems
with it yet.

At the time, I was in offline mode, and my battery says it has 4 hours left.
Comment 64 Eero Tamminen nokia 2007-08-17 19:31:43 UTC
There are several issues listed in this bug.

First/initial one is FAT corruption.  If card isn't cleanly unmounted (there's
data that hasn't been written yet to the card and you unplug USB, HW watchdog
reboots the device or the device battery is taken out etc), the memory card FAT
file system will get corrupted. When device kernel notices that the memory card
contents are corrupted, it makes the card read-only to the rest of the system
to prevent further corruption of the information on the card.

This issue and can be fixed just by running fsck. N800 does *not* run fsck for
the memory cards automatically when they are mounted.

Note: Doing the card writes in sync mode instead of async mode would prevent
the corruption in cases when the device HW watchdog reboots it or battery drops
out, but it wouldn't prevent from corruption when user unplugs the USB cable
from Windows at the wrong moment.  Downside to sync mode would be
*significantly* slower card writing and much more wear for the card.

There are some indications that the corruption could happen also when card is
really properly synced/unmounted, but so far there's no repeatable test case
for this so that it could be debugged.

(We've also encountered one (old) card which was always in read-only state
regardless what OS/device tried to use it, but I think that's a problem with
that particular card.)

------------------------

Next issue is N800 not recognizing all the cards.  There are two separate bugs
on this, bug 1664 and bug 1107.  This issue has been verified internally,
although not to specific mmc slot like mentioned in the bugs.  However, the
memory card slots in N800 have slightly different voltage regulation (max
voltage and power), so it's possible that depending on the memory card the
slots could behave slightly differently.

The community SDHC patch seems to have some things (some commands have sleeps
not mentioned in the official SD specification) with which some of the cards
are recognized better. (It also misses some things from the official release)

The reason why the same card might be recognized with previous release but not
the latest (or vica verse) one is that the previous didn't use the extended
(e.g. voltage) information provided by the card. On the other hand the previous
release could give cards non-standard voltage if they asked for it (inherited
from the mainstream linux kernel and fixed in newer version), so that release
has some issues too.

Next release will hopefully fix these issues (and one MMC-HC recognization
issue too), but they are still under investigation.

------------------------

Last issue is permanently damaged cards.  These are all SD cards, right?

We have two damaged cards from current release, two from previous one and one
from the next one. This bug doesn't list that many cards either which would be
completely damaged, most of the cases are about FAT corruption which
unfortunately just is a property of the FAT file system.

I don't think there's yet enough evidence (cards) to point out that the new
release would be worse in this respect than the previous one.  Our main
maintainer for the co. code in kernel came back from the vacation two weeks ago
and has since been going through the code in our kernel and the community SDHC
patch (and mailing with its author and upstream authors) and testing the cards.
So far there's nothing that would indicate anything that could break the cards
permanently.

Also, so far there's nothing (such as repeatable test case) to indicate that
the issue couldn't be the card itself being faulty, the reason being e.g.
static discharge etc.  If us or somebody else is able to come up with a
repeatable test-case then this issue can be debugged and determined whether its
an issue with device (software) itself.

Internally we increased testing of memory card writing / testing with large
memory cards.
Comment 65 Michael 2007-08-18 12:54:01 UTC
Eero, I am the reporter of three damaged 8GB SDHC cards. You described three
different cases. I want to comment case one and three, because these are the
ones that concern me.

FAT corruption:
You wrote that fat corruption mainly is a result of wrong unmount (not synced
partition). This would indicate that this part of this bug would be a "USER"
fault. But I don't think that wrong SD card handling is our problem. Most
people transferred files (USB, WLAN) and at some point there occured a
read/write error. I had/have also this problem and can say that you aren't able
to unmount such a card again. Also if you shutdown the device normally the card
could not be unmounted correctly and the fat file system corrupts as a result.
How should a USER go around this problem?
Again: Our problem is the read/write error. FAT corruption caused by unsynced
partition is only the result.

Permanently damaged cards:
Ok, I had three damaged 8GB SDHC class 6 cards (Transcend). No problems in
internal slot, only in the external. I could not see any differences between
old firmware with patched kernel and new firmware with its kernel. One of these
cards was damaged without previous fat corruption. Two of these had problems
with fat corruption. I think that the origin of both problems is the same. My
dealer exchanged my cards and now I have two new Transcend 8GB cards again. So
far I have tested one of these cards in the internal slot for three weeks now
and had no problems. I don't want to damage these cards in the external slot
again. My problem is only related to those SDHC cards, my normal 1GB SD cards
are not affected.

So what should I do, Eero? Send my device in for repair? What should I say the
nokia service? If they test my device with a normal 1GB SD card and all works,
they will send my device back and I will still have the same problem with my
Transcend 8GB cards. Perhaps I will have to pay for the service because no
problem was detected. Should I test my two new SDHC cards again? Will Nokia
replace my cards if they get damaged again? Isn't it possible to send my device
directly to a developer (perhaps with my defect SDHC card)?

I am looking forward to hearing from you soon, Eero. And thanks for the work
you (and other developers) are doing to solve this bug! We need the
communication between developers and endusers!
Comment 66 jon.eyre 2007-08-22 02:53:14 UTC
Kingston 1GB MMC mobile card is no longer recognised after flashing from
3.2007.10-7 to 4.2007.26.8. N800 reports no memory card inserted when tried in
both external and internal slots. Card can be written, read and formatted just
fine in WinXP via USB card-reader/writer dongle, so it doesn't appear
permanently damaged. The supplied Nokia SD card still works.
Comment 67 sjmac 2007-08-26 16:01:55 UTC
Another Transcend 8GB SDHC zapped

I've had my N800 for a week, and installed the 4.2007.26-8 firmware right away.

Then bought and installed an 8GB Transcend SDHC card, and installed to the
internal slot.

Added 128MB of virtual memory on that device (!)

Copied 3 *.mp4 data files (I've forgotton how, maybe USB, maybe transfer from
another card in the external memory slot) to the internal memory card.

A couple of days later ...

Tried to install the current Canola (1.0.1), and in trying to debug the
failed/partial install, swapped the 8GB  memory card from the internal to the
external slot (I'd forgotten about the VM on that device, not sure it if was
safe to do).

After some faile attempts to detect files on the memory card, I noticed that my
N800 File Manager no longer registered the presense of the memory card. Now,
when I put the 8GB card in, I get the message "Memory card corrupted or
unformated" displayed briefly in the N800 UI.

Apart from the VM use, the card was very lightly used, less than 1GB data
transferred; the data files were never read because the file format was not
playable by the media player app.

Connecting the N800 to Windows with a USB cable, the size of the card is now
reported as 0 MB by data doctor memory card.

I'm hoping that the problem is "just" that the boot sector has been wiped, so
that I can fix this and use the card in the future.
Comment 68 Matti Savolainen 2007-08-26 23:02:40 UTC
Just reporting a fried 4GB non-SDHC card from yesterday. I have two N800, and
this happened on the newer device that had latest stock kernel (4.2007.26-8).
The card was mounted in the internal slot.

When this happened I was copying ~300MB worth of MaemoMapper map files to the
memory card from Windows PC using USB cable. In the middle of the process
Windows gave error saying something like "destination folder can not be
found..." Sure enough the removable drive was showing empty and capacity as 0
bytes.

When I removed the USB cable from N800 it did not mount the card back. It was
shown as greyed out in N800 file manager. Rebooting the N800 did not solve the
issue. I also tried the card in my USB SD-card reader, and it does not
recognize it either. It is just like the first 2GB SD card that fried on me in
February.

This basically prove that the problem is not only with some specific N800
units. (Or if it is, then I was unlucky to get TWO defective N800's...)

As of the first N800, I have the MMC kernel patch installed on that one and
have not experienced card corruption issues with that since then. (It did
corrupt my 8GB SDHC Patriot Class 4 card FAT table once with the latest
firmware, but was able to recover it by reformatting the card. Since installing
the MMC patch it has been working fine since... As a sidenote, the card worked
fine in that device with earlier firmware, when the SDHC cards required to use
mandatory SDHC patch...)
Comment 69 Ryan 2007-08-27 00:39:18 UTC
An 8GB Class 6 SDHC from Transcend was corrupted in the external slot while
running 4.2007.26-8.  The card was populated with music via my laptop and then
placed in N800 for playback via the media player.  I didn't explicitly write
anything to the card while in the N800.  Strictly reads.  Corruption occurred
after about a month of occasional use.  Card was partially salvaged by
repartitioning and reformatting. I couldn't get all of the cylinders back,
reducing the card to about 7GB.
Comment 70 Tor 2007-08-27 16:01:35 UTC
Are there any hardware differences between devices? Maybe you all could add if
your N800 was made in Finland or made in Korea.. (check under the battery
cover)
Comment 71 Michael 2007-08-27 16:10:22 UTC
(In reply to comment #70)
> Are there any hardware differences between devices? Maybe you all could add if
> your N800 was made in Finland or made in Korea.. (check under the battery
> cover)
> 

Mine was made in Finland. Purchased end of january.
3 damaged 8GB SDHC Class 6 cards (Transcend), external slot. Internal slot
works fine! For details, see comment #20, comment #27
Comment 72 Tim Samoff (reporter) maemo.org 2007-08-27 16:32:22 UTC
As the originator of this report, I have something to add. I've been
successfully using both of my memory cards (internal and external Transcend
4GB) for over a month now. Guess what the factor is: I have transferred files
via Windows, Linux, Mac in all of that time.

I have downloaded plenty of large files, used Maemo Mapper, etc.

Concerning the use of PCs for file transfer, I ALWAYS removed my device
properly. So, I'm pretty sure that's not the main contributing factor
(although, I assume it is sometimes). A few times, I had the same experience as
in Comment #68, where the card was corrupted during transfer.
Comment 73 Tim Samoff (reporter) maemo.org 2007-08-27 16:33:25 UTC
(In reply to comment #72)
> I have transferred files
> via Windows, Linux, Mac in all of that time.

I meant to say: I have NOT transfered file. Sorry!
Comment 74 sjmac 2007-08-27 23:23:53 UTC
Additional to https://bugs.maemo.org/show_bug.cgi?id=1204#c67

The card is not recoverable by writing the (presumed good) bootsector from an
identical memory card on to it using
dd if=/media/mmc2/backup.mbr of=/dev/mmcblk1 bs=512 count=1

(Written several times)

After that process, the card info reported by "Data Doctor Recovery Memory
Card"

Cylinder: 1024
Head: 1
Sectors Per Track: 1
Disk Size: 0 MB

I plugged in the USB cable connected to my Windows machine, and started the
Panasonic SDFormatter V2.0 program from
http://panasonic.jp/support/global/c...formatter.html

That initially looked good as the card size was reported as 7.49 GB, but then
when I tried to format the card the process quickly failed and then reported
the card size as size 497 kB.

I repeated the dd, then different options for the formatting in SDFormatter,
but the results were always the same.

The command 
dd if=/dev/zero of=/dev/mmcblk1
gives the output 
dd: writing '/dev/mmcblk1': No space left on device
1025+0 records in
1024+0 records out

I don't think this is file system corruption.

See additionally
http://www.internettablettalk.com/forums/showthread.php?t=9191
Comment 75 Eero Tamminen nokia 2007-08-29 18:57:18 UTC
(In reply to comment #65)
> Eero, I am the reporter of three damaged 8GB SDHC cards. You described three
> different cases. I want to comment case one and three, because these are the
> ones that concern me.
> 
> FAT corruption:
> You wrote that fat corruption mainly is a result of wrong unmount (not synced
> partition). This would indicate that this part of this bug would be a "USER"
> fault.
>
> But I don't think that wrong SD card handling is our problem. Most
> people transferred files (USB, WLAN) and at some point there occurred a
> read/write error. I had/have also this problem and can say that you aren't
> able to unmount such a card again. Also if you shutdown the device normally
> the card could not be unmounted correctly and the fat file system corrupts
> as a result.

Unmount can fail because something keeps a file open on the MMC.
Kernel does a sync when it tries to unmount the MMC (when the MMC
cover is opened), so unmount failing should be a problem only if
something was writing data to the MMC when this happened.


> How should a USER go around this problem?

File manager in the next release is going to have a way to "repair"
(fsck) the memory card.


> Again: Our problem is the read/write error. FAT corruption caused
> by unsynced partition is only the result.

Do you remember whether the read/write error(s) happened when the device
display was turned off while transferring data to the device (as mentioned
here):?

(In reply to comment #14)
> Perhaps this will help reproduce:I was untar'ing a largish file (python html
> docs), while it was doing this the unit screen went black (power-saving). Came
> back and checked it and it claimed to have had an I/O error.

Did the error happen when using USB(-net) or WLAN for transfer?


(In reply to comment #20)
> I am using the new firmware 4.2007 with sdhc support (N800) and bought
> therefore two transcend 8GB sdhc class 6 cards. I used the first one
> in the internal slot without problems. But the second one in the
> external slot made some trouble. I downloaded a 700MB file from a local
> ftp server to this sdhc card (with wget). After ca. 28% I got an input/output
> error and the card was not accessible anymore. This card was also not
> accessible through my sdhc cardreader (PC).

I assume wget means you were using WLAN not USB(-net)?
Did the input/output error happen when the display was blanked?


(In reply to comment #67)
> I've had my N800 for a week, and installed the 4.2007.26-8 firmware right
> away. Then bought and installed an 8GB Transcend SDHC card, and installed
> to the internal slot.
...
> A couple of days later ...
> 
> Tried to install the current Canola (1.0.1), and in trying to debug the
> failed/partial install, swapped the 8GB  memory card from the internal to the
> external slot (I'd forgotten about the VM on that device, not sure it if was
> safe to do).
...
(In reply to comment #74)
> Additional to https://bugs.maemo.org/show_bug.cgi?id=1204#c67
...
> I plugged in the USB cable connected to my Windows machine, and started the
> Panasonic SDFormatter V2.0 program from
> http://panasonic.jp/support/global/c...formatter.html
> 
> That initially looked good as the card size was reported as 7.49 GB, but then
> when I tried to format the card the process quickly failed and then reported
> the card size as size 497 kB.

If a block in a Flash chip is marked as bad (whether it's still
good or not), there's no way to mark it good again.  I would assume
the same to apply also to how memory cards handle their internal Flash.
I.e. reformatting card multiple times won't help (like it could with
floppy disks).


As to the quality of cards.  AFAIK there have been reports of problems
with Transcend cards also with other (non-Nokia) devices.  We know that
there are definitive differences between the cards, but whether they can
be classed as quality or not is another matter.

For example Transcend 8GB card requests much more power than e.g.
Kingston 8GB card (200mA vs. 25mA i.e. ~8x more, but due to steps specified
in the SD spec, in reality it could be only ~4x times more).  Don't know
whether this is related to bug here though, both memory card slots
should (naturally) provide the maximum amount of power required
by the cards.


We still don't have a reproducible test-case for this so that we could
properly debug it.  All the related code has been reviewed and currently
we're doing more HW measurements, but so far there's no explanation why
the cards file system would corrupt (except due to user actions / HW
watchdog reboot / battery disconnecting) or they would get permanently
damaged.  Any additional information on either is appreciated.
Comment 76 dunsun 2007-08-29 19:10:05 UTC
My 4GB non-SDHC card was completely demaged after reading it's content from
Maemo Mapper. I did no writes on it. Moreover I have had locked it so it was a
HW locked card.
I was reading its content only !!! I did no writes on it.

So how could it be demaged if it was locked with a little HW locker ????
Comment 77 Eero Tamminen nokia 2007-08-29 19:44:05 UTC
(In reply to comment #76)
> My 4GB non-SDHC card was completely demaged

Just filesystem corruption or damaged card (not partitionable nor
formattable e.g. with a separate card reader using PC)?


> after reading it's content from Maemo Mapper. I did no writes on it.

How did you verify that Maemo Mapper didn't write anything to the card?
Did you strace it the whole time?  (AFAIK it writes normally maps and track
data to the card)


> Moreover I have had locked it so it was a HW locked card. I was reading
> its content only !!! I did no writes on it.
> 
> So how could it be demaged if it was locked with a little HW locker ????

The card itself doesn't do anything with that, and neither does N800
(I think the reason was that the HW locker info from the cards is not
reliable enough).
Comment 78 Jake Kunnari 2007-08-30 15:50:14 UTC
*** Bug 993 has been marked as a duplicate of this bug. ***
Comment 79 dunsun 2007-08-30 16:53:27 UTC
(In reply to comment #77)
> (In reply to comment #76)
> > My 4GB non-SDHC card was completely demaged
> 
> Just filesystem corruption or damaged card (not partitionable nor
> formattable e.g. with a separate card reader using PC)?
> 
> 
> > after reading it's content from Maemo Mapper. I did no writes on it.
> 
> How did you verify that Maemo Mapper didn't write anything to the card?
> Did you strace it the whole time?  (AFAIK it writes normally maps and track
> data to the card)
> 
> 
> > Moreover I have had locked it so it was a HW locked card. I was reading
> > its content only !!! I did no writes on it.
> > 
> > So how could it be demaged if it was locked with a little HW locker ????
> 
> The card itself doesn't do anything with that, and neither does N800
> (I think the reason was that the HW locker info from the cards is not
> reliable enough).
> 

Demaged card !! I was trying recover it with dd, testdisk, panasonic utility.
None of these helped. I tried to repair it with n800, SD card reader, my canon
A510 cammera. None of these worked. Interesting is that even dd can not write
anything onto a card.


I am almost sure that meamo mapper was not writing anything on a card cause I
did not have internet activated so no maps could be auto downloaded. Moreover
auto download was disabled ! I was just reading previously saved maps content.

I have demaged this 4GB Pretec 133x SD card for a second time. First time
e-shop gave me a new card. But now I'm affraid they I are not doing it anymore.

after pluging it to my card reader dmesg says:

sd 4:0:0:3: Attached scsi generic sg4 type 0
[17636.260000] SCSI device sdb: 2052 512-byte hdwr sectors (1 MB)
[17636.264000] sdb: Write Protect is off
[17636.264000] sdb: Mode Sense: 03 00 00 00
[17636.264000] sdb: assuming drive cache: write through
[17636.268000] SCSI device sdb: 2052 512-byte hdwr sectors (1 MB)
[17636.272000] sdb: Write Protect is off
[17636.272000] sdb: Mode Sense: 03 00 00 00
[17636.272000] sdb: assuming drive cache: write through
[17636.272000]  sdb:<6>sd 4:0:0:0: Device not ready: <6>: Current: sense key:
No
t Ready
[17637.296000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17637.296000] end_request: I/O error, dev sdb, sector 0
[17637.296000] Buffer I/O error on device sdb, logical block 0
[17637.296000] Buffer I/O error on device sdb, logical block 1
[17638.324000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17638.324000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17638.324000] end_request: I/O error, dev sdb, sector 0
[17638.324000] Buffer I/O error on device sdb, logical block 0
[17638.324000] Buffer I/O error on device sdb, logical block 1
[17639.360000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17639.360000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17639.360000] end_request: I/O error, dev sdb, sector 0
[17639.360000] Buffer I/O error on device sdb, logical block 0
[17639.360000] Buffer I/O error on device sdb, logical block 1
[17640.392000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17640.392000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17640.392000] end_request: I/O error, dev sdb, sector 0
[17640.392000] Buffer I/O error on device sdb, logical block 0
[17640.392000] Buffer I/O error on device sdb, logical block 1
[17641.428000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17641.428000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17641.428000] end_request: I/O error, dev sdb, sector 0
[17641.428000] Buffer I/O error on device sdb, logical block 0
[17641.428000] Buffer I/O error on device sdb, logical block 1
[17641.428000] ldm_validate_partition_table(): Disk read failed.
[17642.460000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17642.460000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17642.460000] end_request: I/O error, dev sdb, sector 0
[17642.460000] Buffer I/O error on device sdb, logical block 0
[17643.496000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17643.496000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17643.496000] end_request: I/O error, dev sdb, sector 0
[17644.528000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17644.528000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17644.528000] end_request: I/O error, dev sdb, sector 0
[17645.560000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17645.560000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17645.560000] end_request: I/O error, dev sdb, sector 0
[17645.560000] Dev sdb: unable to read RDB block 0
[17646.596000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17646.596000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17646.596000] end_request: I/O error, dev sdb, sector 0
[17647.628000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17647.628000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17647.628000] end_request: I/O error, dev sdb, sector 0
[17647.628000] printk: 9 messages suppressed.
[17647.628000] Buffer I/O error on device sdb, logical block 0
[17648.664000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17648.664000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17648.664000] end_request: I/O error, dev sdb, sector 24
[17649.696000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17649.696000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17649.696000] end_request: I/O error, dev sdb, sector 24
[17650.732000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17650.732000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17650.732000] end_request: I/O error, dev sdb, sector 0
[17650.732000]  unknown partition table
[17651.784000] sd 4:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
[17651.784000]     <<vendor>> ASC=0xff ASCQ=0xffASC=0xff <<vendor>> ASCQ=0xff
[17651.784000] end_request: I/O error, dev sdb, sector 1920
Comment 80 Michael 2007-08-30 17:10:57 UTC
(In reply to comment #75)
> > Again: Our problem is the read/write error. FAT corruption caused
> > by unsynced partition is only the result.
> 
> Do you remember whether the read/write error(s) happened when the device
> display was turned off while transferring data to the device (as mentioned
> here):?
> 
> (In reply to comment #14)
> > Perhaps this will help reproduce:I was untar'ing a largish file (python html
> > docs), while it was doing this the unit screen went black (power-saving). Came
> > back and checked it and it claimed to have had an I/O error.
> 
> Did the error happen when using USB(-net) or WLAN for transfer?

Both! USB and WLAN (not at the same time ;)).
My first SDHC card corrupted (only filesystem!) while transferring 1GB of mp3
files (through USB) => write error was diplayed in my linux box. After another
attempt with the same result, I started with testing WLAN downloads (700MB
isos). I can't really remember if this card physically died while using USB or
WLAN, sorry. But every time I got an input/output error, before the SDHC card
was useless. The other two cards (same brand and model) died while transferring
files through WLAN. Screen was definitely blanked some times while transferring
files. But I can't say that every screen blank resulted in an input/output
error!

Today I did some testing on an old 1GB SD card that didn't work properly since
the first official N800 firmware! I couldn't transfer large files properly
(input/output errors). But the filesystem was never damaged on this card. Must
be a robust card ;)

Test environment:
- N800 with its newest official firmware/kernel.
- _no_ fresh install (configured e-mail, rss, chat-client and lots of 3rd party
apps)
- automatic wlan connections were disabled (e-mail, rss, chat)
- WLAN connection through "Buffalo WHR-HP-G54", dd-wrt v24, WPA2
- Filetransfer (wget, xterm) from a local ftp server (700MB iso)
- Two different test cases: 
1. "Beleuchtungsdauer" (lighting duration) = 30 sec, "Bildschirm ausschalten"
(screen switch off) = 1 min
2. lighting duration = 2 min, screen switch off = 5 min
- 4 tests for each test case
- reboot after each failed file transfer
- external slot was used
- screen was blanked after specified time and woken up randomly

Result:
30sec/1min setting:
filetransfer aborted after 15-35% with the following message: "Input/output
error; Kontroll-Verbindung schließen."

2min/5min setting:
all filetransfers were successful!

Interesting result, isn't it?


I wanted to test if "screen wake up" is responsible for this.
So I created a second test scenario:
- same as above, except:
- control of N800 through ssh (as root)
- screen was blanked while working with N800 and wasn't woken up again!
- 1 test for each test case

Result:
same as above!!!

Could "screen blanking" be responsible for this? whats going on here?

Perhaps someone who has problems with filesystem corruptions could test these
scenarios! (which "screen blank" settings did you use?)


> (In reply to comment #20)
> > I am using the new firmware 4.2007 with sdhc support (N800) and bought
> > therefore two transcend 8GB sdhc class 6 cards. I used the first one
> > in the internal slot without problems. But the second one in the
> > external slot made some trouble. I downloaded a 700MB file from a local
> > ftp server to this sdhc card (with wget). After ca. 28% I got an input/output
> > error and the card was not accessible anymore. This card was also not
> > accessible through my sdhc cardreader (PC).
> 
> I assume wget means you were using WLAN not USB(-net)?
> Did the input/output error happen when the display was blanked?

see my answer above!
Comment 81 Mikael 2007-08-30 21:51:05 UTC
I've got two 2Gb Sandisk Ultra2 MiniSD cards (with adapter) corrupted in one
week using the external slot.

I'm using firmware 4.2007.26-8.

Hope this info will be helpful. I really hope this problem will be fixed very
soon.
Comment 82 Randall Arnold 2007-08-30 22:27:38 UTC
Eero, this may have been asked before but I'll ask anyway: given that you know
of issues with at least one SD card brand (Transcend), can Nokia post
*preferred* cards in N800 information locations, such as tableteer, Nseries
page, tablet documentation PDF, etc?  Owners need to be informed upfront so
they can make good purchasing decisions, and this helps all of us out if it can
reduce lengthy, "popular" bug reports like this one.
Comment 83 Michael 2007-08-30 23:31:00 UTC
(In reply to comment #80)
My last test with a 1GB SD card in external slot showed that the "screen switch
off" time has an effect to input/output errors (in my device). Any "screen
switch off" time >1min seemed to solve this wrong write behavior.

So I tested one of my 8GB SDHC Class 6 Transcend cards (that worked properly in
internal slot) in the external slot. I used a 5min "screen switch off" time and
transferred 700MB through WLAN to my N800. And the file was transferred
correctly. No corruption! WOW!!! Until this test, I wasn't able to transfer
such a big file to a 8GB card without card corruption (external slot)!
Then I plugged in the USB cable and transferred another 700MB (30MB video
files) to this card... no errors!

I don't know why this "screen switch off" setting makes a difference in this
situation. Perhaps it's coincidence. But my last tests (comment #80) were very
clearly.

Ok, it would be helpful, if everyone, who has this card corruption problems,
would post his/her "screen switch off" setting.
Comment 84 maemo 2007-08-31 07:33:00 UTC
I have two 8 GB Apacer Class 6 cards in my N800. I've had problems with them
since I got them, however nothing that's resulted in the cards becoming
unusable.

Previously when copying data to them, both with wget (via WLAN) and using
Windows Explorer via direct USB, I would encounter write errors and the memory
card would become unrecognised. Rebooting the N800 would fix this problem,
although I never tested the data that had been written (assuming at least some
of it would be corrupted).

I used to use "Brightness period" of 30 seconds, and "Switch off display" set
to 5 minutes (with keylock as well).

I've had another go with the "Brightness period" set to the maximum 2 minutes.
I copied 3.47 GB of data (73 files) to the internal card via direct USB
connection from a Windows PC. The screen blanked and locked once or twice
during this period. No problems were encountered, all files are listed in the
file manager.

I then tried another test which has been problematic for me: creating a swap
file using the "extend virtual memory" option. I set the size to 96 MB. It got
almost half way, I think, and was taking a very long time, and then it showed
an error dialog saying it was unable to extend the memory.

Then I opened the file manager to view the card. The directory name for the
files I had previously copied was showing in an 8.3 format (it's a long name,
and was previously showing correctly). Inside the directory, only one small
file was visible, while the other files were not listed.

I switched the device off (cleanly), and after restarting opened the file
manager again. The directory is listed with its full name, and all the files
are visible within it again. Not sure what to make of this!

I'll try copying the files off when I get home tonight, and see if any of them
have been corrupted in the process.

So, my results thus far are very inconclusive. I was able to copy a few files
of about 120-150 meg size to the device when I first got the new memory cards,
but they seemed to be flukes as I had lots of problems after when trying to do
the same thing.
Comment 85 Eero Tamminen nokia 2007-08-31 18:20:52 UTC
(In reply to comment #82)
> Eero, this may have been asked before but I'll ask anyway: given that you know
> of issues with at least one SD card brand (Transcend), can Nokia post
> *preferred* cards in N800 information locations, such as tableteer, Nseries
> page, tablet documentation PDF, etc?

We don't have *that* kind of information.  This issue is still being
investigated and until we know the actual cause for the people's problems,
you really cannot do something like that.  I think at most you could say
that the issue seems to happen more easily with larger cards.

If others having trouble with their cards (read/write errors) could test
what Michael did, we would appreciate it. I.e:
- do the problems happen if the screen is off / when it switches off
- whether USB cable is connected (to PC) or not
  (similarly to RD-mode, prevents the device from going to power-save
  mode so you can drain your battery in a day while device idles)
- Does the transfer happen over WLAN
Comment 86 Mikael 2007-09-01 14:25:44 UTC
(In reply to comment #85)
> (In reply to comment #82)
> > Eero, this may have been asked before but I'll ask anyway: given that you know
> > of issues with at least one SD card brand (Transcend), can Nokia post
> > *preferred* cards in N800 information locations, such as tableteer, Nseries
> > page, tablet documentation PDF, etc?
> 
> We don't have *that* kind of information.  This issue is still being
> investigated and until we know the actual cause for the people's problems,
> you really cannot do something like that.  I think at most you could say
> that the issue seems to happen more easily with larger cards.
> 
> If others having trouble with their cards (read/write errors) could test
> what Michael did, we would appreciate it. I.e:
> - do the problems happen if the screen is off / when it switches off
> - whether USB cable is connected (to PC) or not
>   (similarly to RD-mode, prevents the device from going to power-save
>   mode so you can drain your battery in a day while device idles)
> - Does the transfer happen over WLAN
> 

Today I've changed from a Sandisk MiniSD ULTRA-II 2Gb to a Transcend MicroSD
2Gb. I also put it into the internal slot and changed the screensaver to
1min/3min.

So far so good. I've only made transfers over WLAN.. I downloaded a 700Mb Linux
ISO without problem, which didnt work with the two sandisk cards i've destroyed
earlier. I will not do any more tests since the store looked at me weird when i
came in with a second destroyed card in 4 days.. :)
Comment 87 Eero Tamminen nokia 2007-09-03 15:24:14 UTC
Some more information. If you look at the diagram in the SD specification
page 16:
http://www.sdcard.org/about/memory_card/pls/Simplified_Physical_Layer_Spec.pdf

The few broken cards we have, never become ready (they are forever busy)
when given the CMD041 on the left branch of the diagram.


And one more question.  Has anybody gotten his card broken (not just corrupted)
while the USB cable is still connected to the PC, or only after disconnecting
the cable?
Comment 88 mac_os_x 2007-09-05 12:24:20 UTC
I have a Trancend 2G 150x card in the external slot. It gets corrupted every
time I copy large amounts of data, for example: using maemo mapper, connecting
to my Mac via FTP and downloading a PDF file of 2 or more MB, downloading video
files from internet.

After a card corruption occurs, I format it again in my PC Windows, then insert
the card in Nokia n800 and format again using the formatting utility on Nokia
n800 file manager.

Reading the card never gives me a problem, only copying large amounts of data
(if you can consider more than 1 MB a large amount of data). It doesn't deppend
on the firmware version: it occurs since the first purchase of the device. I
wonder if I'm still covered by the warranty and if I can exchange it for
another one without this problem).
Comment 89 Eero Tamminen nokia 2007-09-05 13:10:12 UTC
(In reply to comment #88)
> I have a Trancend 2G 150x card in the external slot. It gets corrupted every
> time I copy large amounts of data, for example: using maemo mapper, connecting
> to my Mac via FTP and downloading a PDF file of 2 or more MB, downloading 
> video files from internet.

Does the corruption happen if you:
- have the USB cable connected, or
- don't let the screen to blank
?
Comment 90 mac_os_x 2007-09-05 13:33:25 UTC
(In reply to comment #89)
> (In reply to comment #88)
> > I have a Trancend 2G 150x card in the external slot. It gets corrupted every
> > time I copy large amounts of data, for example: using maemo mapper, connecting
> > to my Mac via FTP and downloading a PDF file of 2 or more MB, downloading 
> > video files from internet.
> 
> Does the corruption happen if you:
> - have the USB cable connected, or
> - don't let the screen to blank
> ?
> 

- Cable USB not connected; corruption via WiFi download throught an FTP
connection using the Opera FTP mode. Also downloading maps with maemo mapper
via WiFi; never connected.
- Last time corruption occured the device was with the screen dim, but not
blank, and the download stopped at 49%. I don't know how much time the download
was stopped, but in preferences, my device needs 2 min to dim the screen.
Comment 91 Randall Arnold 2007-09-05 15:45:39 UTC
I understand that the timing may not be appropriate at this point, but I still
believe it's a good idea to implement at some future point.  Note that other
vendors do this in similar situations.

(In reply to comment #85)
> (In reply to comment #82)
> > Eero, this may have been asked before but I'll ask anyway: given that you know
> > of issues with at least one SD card brand (Transcend), can Nokia post
> > *preferred* cards in N800 information locations, such as tableteer, Nseries
> > page, tablet documentation PDF, etc?
> We don't have *that* kind of information.  This issue is still being
> investigated and until we know the actual cause for the people's problems,
> you really cannot do something like that.  I think at most you could say
> that the issue seems to happen more easily with larger cards.
> If others having trouble with their cards (read/write errors) could test
> what Michael did, we would appreciate it. I.e:
> - do the problems happen if the screen is off / when it switches off
> - whether USB cable is connected (to PC) or not
>   (similarly to RD-mode, prevents the device from going to power-save
>   mode so you can drain your battery in a day while device idles)
> - Does the transfer happen over WLAN
Comment 92 Andy Flach 2007-09-09 15:03:01 UTC
My new N800 destroyed a new 2GB SanDisk Ultra II SD card in the external slot. 
The first symptom was that when I opened Maemo Mapper while offline I got a
message that the program couldn't open the map cache on the card.  I looked at
the card in  the file manager and I could see a shortened version of the name
of the maps cache directory I had created (it was the only directory I had put
on the new card), but it showed as a 1k file and not a directory, and it was
impossible to open it.  I tried reformatting the card in the N800, but after a
few attempts all that did was make the card completely invisible to the N800
file manager (no card installed).  I later tried to access the card on a
Windows machine using a USB card reader, but Windows didn't see the card at
all, so at that point I gave up and returned the card to Costco for a refund.
Comment 93 David Botton 2007-09-09 21:39:58 UTC
I ssh'd in to my n800 and performed a:

fsck.vfat -a /dev/mmcblk1p1

removed the card and reinserted and all problems resolved, card RW again.

I am using an 8gig PNY class 4

David Botton
Comment 94 arinbennett 2007-09-12 02:08:23 UTC
(In reply to comment #92)
> My new N800 destroyed a new 2GB SanDisk Ultra II SD card in the external slot. 
> The first symptom was that when I opened Maemo Mapper while offline I got a
> message that the program couldn't open the map cache on the card.  I looked at
> the card in  the file manager and I could see a shortened version of the name
> of the maps cache directory I had created (it was the only directory I had put
> on the new card), but it showed as a 1k file and not a directory, and it was
> impossible to open it.  I tried reformatting the card in the N800, but after a
> few attempts all that did was make the card completely invisible to the N800
> file manager (no card installed).  I later tried to access the card on a
> Windows machine using a USB card reader, but Windows didn't see the card at
> all, so at that point I gave up and returned the card to Costco for a refund.
> 

I too had the same problem today - was running Maemo Maps and suddenly it
couldn't write to the card. Card came up empty within the D800 but read within
Explorer in Windows - was able to copy everything but the Maemo Maps directory
off (this appeared to be corrupted). I reformatted and the card seems okay for
now, but I'm scared it's gunna happen again and the card will be unusable.
Comment 95 Ton 2007-09-13 12:40:15 UTC
(In reply to comment #36)

Hola Quim!

I was offline, in a plane, listening to music using Kagu and watching photos
using the image viewer when suddenly the image viewer couldn't find photos
anymore.
SD card corrupt.
Tried to re-format the card using File Managers card format menu. Seemed to
work.
At home i connected my IT to my Mac mini running Windows XP using the USB cable
and copied a video file over to the SD card.
Walking to work i watched part of the video. Once in the office the video
cannot be found anymore.
Tried to format the card again using the File Manager. Now the File Manager
gives me the message that the card is corrupted.
Tried to format the card in a Toshiba laptop running Windows using the Toshiba
SD card formatter utility. This utility cannot find the card. Windows Explorer
recognizes the card being in the drive, but also cannot format it.

I have this card since February and never had any problem. This week it was the
first time that i copied files from an Acer laptop using Vista to the card. I
had never done that before.

My device is the N800 with firmware 4.2007.26-8
The SD card is a OX Pro 4Gb 150x.
Comment 96 Ton 2007-09-13 13:47:12 UTC
(In addition to comment #95)

I think in Nokia is looking in the wrong places to solve this bug. Mine was
burned while walking in the street. Nothing about transferring files, no
connectivity whatsoever. And since it only seems to happen in the external slot
i get the feeling that our devices are faulty.
<rant mode on>
How about that, Nokia? What about replacing the faulty N800's for ones that
don't corrupt SD cards in the external slot? Ones that do have the physical
connector/slot properly done.
<rant mode off>
Comment 97 Tim Samoff (reporter) maemo.org 2007-09-13 14:22:46 UTC
(In reply to comment #96)
> ...And since it only seems to happen in the external slot...
> 

This is not true. It happens in both internal and external.

Tim
Comment 98 George Giannopoulos 2007-09-18 22:48:14 UTC
Well my N800 finally bricked my Patriot 8GB SDHC card. The card was in the
external slot and I was doing nothing when the card stopped working. The card
was loaded full of mp3's and some movies and they worked fine, up until I
hooked up the usb cable with the device off. I then powered the device on and
after that I was unable to access the card.

The card was readable in Windows, however I could not view any of the
partitions on the card on the Nokia or my linux box.
Comment 99 Dan Ramos 2007-09-19 12:31:27 UTC
Wish to add myself to the list of people having SDHC corruption issues with two
A-Data 8GB Turbo-6 chips on my N800 with OS 2007 4.2007.26-8.  From the moment
I used them they both began getting corrupt in either slot at one point or
another and at the same time sometimes.  When I'd finally reformat them they'd
be okay for a good several days before showing at least SOME corruption. 
Tonight my external slot SDHC lost MOST of the files I had on there (close to
6gb of podcasts).  I'm rather furious as MOST of the various branded cards I've
ever used have had problems (except three of the four 2GB chips I've owned..
the one card was ruined so badly while inside the N800 that I couldn't even fix
it with a chip reader which usually does the job.)

I've been using an SDHC card reader to fsck it on my Linux box (and on rare
occasion had to rebuild an MBR with parted before reformatting).  I'm really
frustrated by the fact that I'd love this device except for the awful
experience with corruptions on SD cards where none of my other devices ever
experience these problems (my camera, my Palm Tungsten T5, my card readers,
etc.).  I've even purchased the Navicore kit and was happy to have the nav data
always available along with all the rest of my media with such high capacity
cards--but it's been very tenuous with the corruptions happening so often.

Please, please issue a fix soon!

Thanks
Comment 100 sarah.newman 2007-09-21 09:40:20 UTC
Sandisk Ultra II 2.0 GB. Bricked within one week in the external slot after
messy shutdown -- device would just not turn off.  I used the card for 1-2
years in palm devices.
Comment 101 Tim Samoff (reporter) maemo.org 2007-09-24 03:23:28 UTC
A new occurrence:

I downloaded a ≈190MB Zip file to my external MMC (Transcend 4GB) via http. The
file dowloaded just fine, but when I came back from "sleep" mode (screen off),
the directory structure of the MMC was fairly b0rked: half of the directories
were missing and the remaining ones (if their names were longer that eight
characters) were truncated with tilde/number format (e.g., instead of
"myfilename," it would be "myfil~01").  Likewise, the downloaded Zip file was
nowhere to be found.

After restarting my N800, though, all was back to normal. Directories were
fine, downloaded Zip file was fine, etc.

The card has been working ever since. But, I'm wondering if this behavior might
offer any clues.
Comment 102 Neil MacLeod maemo.org 2007-09-24 23:01:17 UTC
Isn't it about time for a progress update, Nokia?

This bug is OLD, and SERIOUS. It's causing a lot of aggravation. People are
filing comments, providing more information. You're staying very quiet. That's
NOT how Bugzilla is supposed to work.
Comment 103 Kimmo Hämäläinen nokia 2007-09-25 09:45:21 UTC
It's a kernel issue and it's being fixed.
Comment 104 Neil MacLeod maemo.org 2007-09-25 13:32:24 UTC
Thanks Kimmo, knowing that it is isolated and being fixed is excellent news,
though why this news wasn't announced without prompting staggers me.

Would it be possible to provide a little more detail about the bug? The
community comments have been fairly detailed, and there's no reason why Nokia
can't respond in kind! :) Nothing too detailed, just a (fairly technical)
review of the bug... or links to kernel commits.

Now the problem is isolated and a fix being worked upon, do you still need bug
more reports or do you have enough? Will it be possible to release a patched
kernel (either via Nokia or via the community) ahead of the next scheduled
firmware?
Comment 105 Quim Gil nokia 2007-09-26 01:18:35 UTC
One week more and we will be able to provide the answers you are waiting for.

The comments in this bug report have been indeed very useful. Thank you very
much for your help. 

Sorry for the silence, but Nokia developers are "Nokia Inc." at all effects
even in the comments of a report in Bugzilla. This is delicate specially when
the reports mention potential damage in third party software/hardware.

Internally we have been working not-in-silence during this time. You will see
the results next week. Please wait until then for details.
Comment 106 Neil MacLeod maemo.org 2007-09-26 02:53:26 UTC
(In reply to comment #105)
> One week more and we will be able to provide the answers you are waiting for.
> 
> The comments in this bug report have been indeed very useful. Thank you very
> much for your help. 
> 
Thanks Quim.

> Sorry for the silence, but Nokia developers are "Nokia Inc." at all effects
> even in the comments of a report in Bugzilla. This is delicate specially when
> the reports mention potential damage in third party software/hardware.
> 
At the risk of taking this bug OT, is this attitude/policy due to change any
time soon (at least in general, as opposed to when hardware is damaged)? I look
at the Moblin Bugzilla[1] and see it dominated by intel.com reports and
comments - ie. Bugzilla done right IMHO. The Nokia legal department could be
the death knell for Nokia open source aspirations at this rate. :(

1. http://moblin.org/bugzilla.html
Comment 107 Dan Ramos 2007-09-26 08:11:45 UTC
Yep.  Today--one of my two 8GB SDHC cards was finally corrupt to death.  It
will no longer function in the N800 and when I try to use a card reader.  There
are multiple sensing errors (media not found) despite the reader functioning
and showing up in all dmesg and lspci listings on my Linux box at home and my
work's Windows laptop sees the drive but at the same time reports that it's not
there when I try to do anything with it (fdisk, format, etc.).  This is the
second time my N800 has destroyed a flash card irreparably.  8GB SDHC chips
aren't cheap and I trusted the announcement from Nokia that the device is SDHC
compatible with the current kernel.  If the kernel fix had been released
yesterday, it would have been prevented.  This is a pretty critical bug fix and
I'd like to know what Nokia will do for those of us who've had our SD/SDHC
flash cards destroyed.  Is there any way to repair the cards?  Will I be
reimbursed for something I went out and bought on Nokia's word?  Who can I
speak to?  Sorry if I seem to rant--as I'd mentioned.. this is the second card
I've had end up apparently unable to repair with any tool and this one was a
pretty expensive chip.
Comment 108 Quim Gil nokia 2007-09-26 09:56:03 UTC
Dan: answers to your questions will also come next week, I'm afraid. These
answers involve technical and business matters, and we want/need to have
everything in place for our response. This is why the fix release is taking
longer.

Neil: about the OT yes, the will be a lot of improvement in our handling of
bugzilla. As soon as Chinook is out of the way, the Diablo release cycle should
bring many visible improvements in our community fialog and interaction,
including bugzilla. I'm happy discussing more, but in maemo-developers or
elsewhere out of this bug report.
Comment 109 Quim Gil nokia 2007-09-26 22:58:16 UTC
Alright, so here we go with some details.

According to our findings, some SDHC cards could get corrupted by a combination
of two bugs under special circumstances:

- One bug belongs to our platform. While being in sleep mode but with a
background process involving the MMC (i.e. long downloads over wlan) the
voltage from the memory card was also dropped. We didn't find problems using
USB. 

- Another bug belongs to the card configuration though, and has nothing to do
with our software/hardware. According to the SD-Memory Card Specifications, the
cards should not get damaged even with the bug we had. In a wost case scenario
users could get corrupted files, but still in a functional card.

The fix to our bug is planned to be released next Tuesday 2/oct, and announced
to end users (properly, not in a bug report as I'm doing now at a developer /
power user level). We are currently testing the new image and it seems to be
handling correctly the cards in all kinds of situations and card models.

About the corrupted cards, the official statement is that Nokia has no
responsibilities over them, due to the reason pointed above. 

I have been asking around for more details in order to provide here an extended
unofficial answer. Users affected should be able to claim where they purchased
the card. In principle there shouldn't be a problem to get a replacement or the
cash, always according to the guarantee of the card.

If you have more questions please ask. The Nokia developers CCed here should be
able to answer the technical questions. I will do my best with the rest.
Comment 110 Dan Ramos 2007-09-27 05:12:54 UTC
I have to say that I'm not pleased with Nokia's response (nor response time
relative to the time it decided to label the N800 SDHC compatible) but I'm less
personally upset about it because I've managed to hack the darned 8GB SDHC card
into working (probably by some fluke--like I said, I think I hacked it into
working in the truest technical sense of the word).

I decided to post this to explain what I did to fix my SDHC card but I must
stress again that it might have been a fluke and I disclaim any responsibility
if you try it yourself and damage something--because I know what I did was a
no-no.

I spent a lot of time with tools and examining kernel messages trying to find
SOMETHING to fix the SDHC card that NOTHING wanted to work with.  Using the
card reader I have--whcih seems to be the most reliable way to communicate with
the SD and SDHC cards, Windows will see the E drive.. but kept reporting that
there was no media.  Linux would see the drive but then wouldn't set up a
device for it in the /dev so I couldn't even do a dd or fdisk or anything. 
Since Linux kept complaining it was a sensing error.. and I figured the card
for dead once and for all.. I just decided to try and see if I could trick the
card reader into sensing the card by taking out and inserting the SDHC card out
and back into the reader.  Suddenly VOILA!  There were my files!  I did a good
media check and fsck in both Windows and Linux and it worked normally again.  I
was able to use it properly each time.  I finally placed it into the N800 and
it worked fine again!

Now I wish I'd kept that old 2GB that NOTHING wanted to work with to see if
that trick might work.  The card reader I'm using is a SanDisk MobileMate SD+
and as usual.. I will love SanDisk forever now. :)  I've never been
disappointed with their stuff despite the higher price and this just bolsters
my confidence in their products.

But like I said.. that was such a hack.  If you think your card is worthless
and nothing else works, maybe that will work--but you do it at your own risk. 
I certainly am glad it worked in my case.

Now.. let's get that N800 working solidly.  I love the darned thing if not for
these corruptions. :(

Be well and I look forward to thanking you despite my disappointments so far.
:)
Comment 111 Quim Gil nokia 2007-09-27 08:32:23 UTC
Thanks for this, Dan. 

> I'm not pleased with Nokia's response

Note that my comment #109 is not "Nokia's response" alone. Nokia's response
response will be more or less completed in a week in the form of a bugfix
release, communication to end users through the end user channels + anything we
keep sharing and discussing more informally at a developer level in
*.maemo.org.

Personally I won't try to convince otherwise any user upset with this issue.
Please rant as much as you feel like, specially if you can be as constructive
as to send new findings (did I say thanks to Dan already?). We keep taking
note, trying to learn not to repeat mistakes and improve our performance.

Just one more detail. The N800 is compatible with SDHC cards. This
compatibility is defined against the standard specifications since this is why
standards are for. (Please tell me if I'm wrong with this since I'm no kernel
developer, nor expert in memory cards.)

There was a bug in the Linux kernel for months. Apparently Nokia customers were
the first ones hitting it in a noticeable way. Now we have fixed it and the
patch has been or will be contributed upstream. Hopefully nobody else will have
this issue again in any Linux system dealing with sleep mode and certain memory
cards.

This doesn't solve the issue about cards not being fully compliant with the
specifications, but I hope you understand this is out of our responsibility and
scope.

About possibilities to recover data and bring a corrupted card back to life,
the only I know is that we got mixed results. As far as I know sometimes the
cards could get recovered, sometimes they seemed to be lost forever. The paths
to recover a card are quite hackish and not really recommended for the average
end user. This is why in our communication to end users we won't mention
anything and the recommendation is to contact the retailer to get a
replacement. 

Developers and power users like you might find alternative ways, perhaps with
the help of the Nokia developers that went through the tests (up to them). You
might want to consider opening a wiki page with recovery methods and any other
information you find interesting.
Comment 112 Tor 2007-09-27 14:59:28 UTC
(In reply to comment #109)
> The fix to our bug is planned to be released next Tuesday 2/oct, and 

I hope the kernel update will include full-speed card support (48MHz), instead
of the current 24MHz, which as far as I understand was an earlier (failed)
attempt to fix the corruption issue..

Other than that, I must say this development sounds like good news indeed.
Cheers!
Comment 113 James Pooton 2007-09-27 20:12:34 UTC
Thanks for the info!  Will this Oct 2nd update be available as a kernel update
package or will it just offered as a complete flash image?

I'd also love to hear a comment about the post above re: 48MHz operation. That
would make me very happy :)
Comment 114 Jerome 2007-09-28 20:32:49 UTC
I am not sure this belongs to this bug, but anyway...

My card got corrupted once. I managed to revive it by reformat it in a Canon
digital camera. Now, when I try fsck on that card (8GB, SDHC, Transcend), I get
the answer:  "Currently, only 1 or 2 FATs are supported, not 191."

When I try fsck on the other card (4GB, SD, Transcend), I get: "logical sector
size is zero"

Both cards check without errors on my mac (OSX 1.4.10, BSD based) using a
Transcend SD USB card reader.
Comment 115 Quim Gil nokia 2007-10-01 08:47:25 UTC
Re 24 MHz vs 48 MHz: this hasn't changed. 

The fact that the official configuration is set at 24 Mhz has actually nothing
to do with this bug, but with the hardware components used in the tablet and
how they interact. 48 Mhz might work but it is not guaranteed in our setting,
this is why we keep it away from our sales product.
Comment 116 Frantisek Dufka maemo.org 2007-10-02 14:48:40 UTC
Looks like new firmware is available
http://europe.nokia.com/link?cid=PLAIN_TEXT_80293
Question #1 to @nokia.com - can we just flash the kernel part to fix this
isssue?
Question #2 Do you plan to update kernel source in bora repository or will you
post patch here? Thanks.
Comment 117 Quim Gil nokia 2007-10-02 15:37:25 UTC
Fix released: http://maemo.org/news/announcements/view/1191328183.html

Frantisek, I (or someone else) owe you 2 answers to your points. Let me ask.
Comment 118 Randall Arnold 2007-10-03 03:23:08 UTC
Quim, great example of communications, thanks.

(In reply to comment #111)
> Thanks for this, Dan. 
> > I'm not pleased with Nokia's response
> Note that my comment #109 is not "Nokia's response" alone. Nokia's response
> response will be more or less completed in a week in the form of a bugfix
> release, communication to end users through the end user channels + anything we
> keep sharing and discussing more informally at a developer level in
> *.maemo.org.
> Personally I won't try to convince otherwise any user upset with this issue.
> Please rant as much as you feel like, specially if you can be as constructive
> as to send new findings (did I say thanks to Dan already?). We keep taking
> note, trying to learn not to repeat mistakes and improve our performance.
> Just one more detail. The N800 is compatible with SDHC cards. This
> compatibility is defined against the standard specifications since this is why
> standards are for. (Please tell me if I'm wrong with this since I'm no kernel
> developer, nor expert in memory cards.)
> There was a bug in the Linux kernel for months. Apparently Nokia customers were
> the first ones hitting it in a noticeable way. Now we have fixed it and the
> patch has been or will be contributed upstream. Hopefully nobody else will have
> this issue again in any Linux system dealing with sleep mode and certain memory
> cards.
> This doesn't solve the issue about cards not being fully compliant with the
> specifications, but I hope you understand this is out of our responsibility and
> scope.
> About possibilities to recover data and bring a corrupted card back to life,
> the only I know is that we got mixed results. As far as I know sometimes the
> cards could get recovered, sometimes they seemed to be lost forever. The paths
> to recover a card are quite hackish and not really recommended for the average
> end user. This is why in our communication to end users we won't mention
> anything and the recommendation is to contact the retailer to get a
> replacement. 
> Developers and power users like you might find alternative ways, perhaps with
> the help of the Nokia developers that went through the tests (up to them). You
> might want to consider opening a wiki page with recovery methods and any other
> information you find interesting.
Comment 119 Quim Gil nokia 2007-10-03 08:01:26 UTC
Answer #1 - Yes, just reflashing the kernel fixes the SDHC issues. The only
changes affect the MMC driver.

Answer #2 - I guess we can do both, but at least the bora repository should be
updated. I hope it will take less time just to fix this today than me finding
out the answer.  :)
Comment 120 Eero Tamminen nokia 2007-10-03 17:35:30 UTC
(In reply to comment #104)
> Would it be possible to provide a little more detail about the bug? The
> community comments have been fairly detailed, and there's no reason why Nokia
> can't respond in kind! :) Nothing too detailed, just a (fairly technical)
> review of the bug...

What happened:
- Once the card has acknowledged that it had received the data,
  the kernel driver switched the MMC clock off
- If the device doesn't have any active clocks (display off, no USB
  connected, no RD-mode, no network activity for a while, MMC clocks
  off etc), the kernel power management switched the device into sleep mode
- In sleep mode MMC ports get less power

However, the card could still be doing something internally which would
draw power from the MMC port.  With some cards, this seems to have damaged
them.  If the card wants more power (like Sandisk cards), and is higher 
capacity, it seemed more likely to get damaged.  I.e. this is not specific
to SDHC, nor to any specific N800 release (they all have about the same
power management).

Because you needed to have just written quite a bit of data to the card
(so that it will do something even after the device goes to sleep mode)
in a way that the device can and will be idle immediately after it, I
think the only real use-case where you would have triggered this with
the *pre-installed* software would be Browser file download which you
had changed to go to MMC...


The fix is that the kernel MMC driver controls now the MMC port regulators
(power) in addition to clocks and it will poll the cards until they're
in the ready state before switching the co. clocks off and the ports to
low power.


Now, to why (too) low power could damage the cards so badly, this is
basically guesswork.  Assumption is that with the above conditions some
of these cards could get bad blocks and that if a bad block is in some
critical place or whole card gets full of bad blocks, the card never gets
out of the busy state.


(In reply to comment #110)
> I've managed to hack the darned 8GB SDHC card into working
> (probably by some fluke--like I said, I think I hacked it into
> working in the truest technical sense of the word).
...
> I spent a lot of time with tools and examining kernel messages trying to find
> SOMETHING to fix the SDHC card that NOTHING wanted to work with.  Using the
> card reader I have--whcih seems to be the most reliable way to communicate with
> the SD and SDHC cards, Windows will see the E drive.. but kept reporting that
> there was no media.  Linux would see the drive but then wouldn't set up a
> device for it in the /dev so I couldn't even do a dd or fdisk or anything. 
> Since Linux kept complaining it was a sensing error.. and I figured the card
> for dead once and for all.. I just decided to try and see if I could trick the
> card reader into sensing the card by taking out and inserting the SDHC card out
> and back into the reader.  Suddenly VOILA!  There were my files!  I did a good
> media check and fsck in both Windows and Linux and it worked normally again.  
...
> The card reader I'm using is a SanDisk MobileMate SD+
> and as usual.. I will love SanDisk forever now. :)

Were both the card and reader from the same manufacturer?

Maybe it has some non-standard access to the card which allows
it to avoid the bad blocks or even to rewrite whether they
are really bad (as in this case they probably wouldn't).


(In reply to comment #114)
> My card got corrupted once. I managed to revive it by reformat it in a Canon
> digital camera. Now, when I try fsck on that card (8GB, SDHC, Transcend),
> I get the answer:  "Currently, only 1 or 2 FATs are supported, not 191."
>
> When I try fsck on the other card (4GB, SD, Transcend), I get: "logical sector
> size is zero"

When you do fsck while the card is inserted into N800?
Is it any better with the new kernel release?


> Both cards check without errors on my mac (OSX 1.4.10, BSD based) using a
> Transcend SD USB card reader.

See my above comment about matching manufacturer for card & reader...
Comment 121 Frantisek Dufka maemo.org 2007-10-04 11:46:27 UTC
Thanks Quim and Eero for your answer and explanation.

(In reply to comment #119)
> Answer #2 - I guess we can do both, but at least the bora repository should be
> updated. I hope it will take less time just to fix this today than me finding
> out the answer.  :)

Kernel here http://repository.maemo.org/pool/bora/free/source/ is still not
updated. Additionally, mmc driver patch attached to this bug would be nice too
if you have one ready or can produce it easily. Thanks :-)
Comment 122 Dan Ramos 2007-10-06 08:18:40 UTC
Replying back to entry #120:
> > I've managed to hack the darned 8GB SDHC card into working
> > (probably by some fluke--like I said, I think I hacked it into
> > working in the truest technical sense of the word).
> ...
> > I spent a lot of time with tools and examining kernel messages trying to
> > find SOMETHING to fix the SDHC card that NOTHING wanted to work with.
> > Using the card reader I have--whcih seems to be the most reliable way to
> > communicate with the SD and SDHC cards, Windows will see the E drive..
> > but kept reporting that there was no media.  Linux would see the drive
> > but then wouldn't set up a device for it in the /dev so I couldn't even
> > do a dd or fdisk or anything. 
> > Since Linux kept complaining it was a sensing error.. and I figured the card
> > for dead once and for all.. I just decided to try and see if I could trick
> > the card reader into sensing the card by taking out and inserting the SDHC
> > card out and back into the reader.  Suddenly VOILA!  There were my files!
> > I did a good media check and fsck in both Windows and Linux and it worked
> > normally again.
> ...
> > The card reader I'm using is a SanDisk MobileMate SD+
> > and as usual.. I will love SanDisk forever now. :)
> 
> Were both the card and reader from the same manufacturer?
> 
> Maybe it has some non-standard access to the card which allows
> it to avoid the bad blocks or even to rewrite whether they
> are really bad (as in this case they probably wouldn't).

To clarify:  nope!  Like I'd said in one of my previous messages, I am using a
couple of A-Data 8GB Turbo 6 SDHC cards and the reader is a SanDisk MobileMate
SD+

Since I'm making this entry, I want to note that I've now had a few days to
play with the new kernel and so far as I can tell--it has been FLAWLESS.   I've
abused my two 8gb SDHC cards by doing everything I KNOW had damaged my cards
before with various TINY files (to use up a lot of inodes) and lots of HUGE
file (so stream a LOT of data), and so on and so on... and not ONCE have I had
a problem.

I can't thank you enough for this fix--it has made my N800 absolutely PERFECT
now!  I can go back to writing Python scripts on my Bluetooth keyboard while
playing my podcast programs while checking my RSS feeds occasionally while this
while that... all fluidly and reliably!  I've TRIED to abuse it. :)  FANTASTIC!

Thanks again!
Comment 123 Eero Tamminen nokia 2007-10-08 16:02:31 UTC
> I can't thank you enough for this fix--it has made my N800 absolutely PERFECT
> now!  I can go back to writing Python scripts on my Bluetooth keyboard while
> playing my podcast programs while checking my RSS feeds occasionally while this
> while that... all fluidly and reliably!  I've TRIED to abuse it. :)  FANTASTIC!

Thanks for testing and reporting the results! :-)

The MMC fix release has also some things ("magic" waits) from the non-Nokia
SDHC patch which help in recognizing some cards that were not recognized in
the earlier release.

Because the fix required some changes to how MMC port power management is done,
your idle time before needing a recharge might be slightly smaller now when
MMC is inserted, but the difference to previous release should be really small
(and depends a bit how power-hungry your MMC card is and how much you write
to it).

One can of course still get the FAT filesystem corruption if one disconnects
the USB cable before using "Safely remove" option in Windows (or sync or
unmount
in Linux).  Plugging the USB cable back doesn't help, if the FAT got corrupted,
the FAT filesystem needs to be fixed with Windows scandisk (or Linux dosfsck).
But that's a separate issue from the card getting damaged which is now fixed.

We'are of course still interested about any other issues in the MMC support.
Those just need go into some other bug...
Comment 124 James Pooton 2007-10-08 18:57:55 UTC
Will the new kernel source or patch be posted soon?  I know a few of us would
really appreciate it! :)
Comment 126 Jerome 2007-10-12 00:10:42 UTC
(In reply to comment #120)
> (In reply to comment #114)
> > My card got corrupted once. I managed to revive it by reformat it in a Canon
> > digital camera. Now, when I try fsck on that card (8GB, SDHC, Transcend),
> > I get the answer:  "Currently, only 1 or 2 FATs are supported, not 191."
> >
> > When I try fsck on the other card (4GB, SD, Transcend), I get: "logical sector
> > size is zero"
> 
> When you do fsck while the card is inserted into N800?

I ran fsck.vfat while the card was inserted in the N800, yes.


> Is it any better with the new kernel release?
> 
> 

Now, I installed the new kernel release (that's what took me so long to
answer). I had to reformat the card to stop the N800 freezing at random times
(and that problem is solved) and I reformatted them in the N800 itself. I get a
different error when running fsck, about the two copies of the FAT not
matching, but fsck runs. 


> > Both cards check without errors on my mac (OSX 1.4.10, BSD based) using a
> > Transcend SD USB card reader.
> 
> See my above comment about matching manufacturer for card & reader...
> 

The cards are also from Transcend, so cards and reader did match!
Comment 127 Eero Tamminen nokia 2007-10-12 14:42:43 UTC
>>> Both cards check without errors on my mac (OSX 1.4.10, BSD based) using a
>>> Transcend SD USB card reader.
>> 
>> See my above comment about matching manufacturer for card & reader...
>
> The cards are also from Transcend, so cards and reader did match! 

Could you make a new bug about that?  Thanks!
Comment 128 Jerome 2007-10-12 20:46:39 UTC
(In reply to comment #127)
> Could you make a new bug about that?  Thanks!
> 

Actually the message is "there are differences between boot sector and its
backup". I entered the bug as bug 2102.
Comment 129 Henri Bergius 2009-11-19 13:04:22 UTC
Not sure if it is related, but recently on my N900 (1.2009.41-10) my memory
cards (both the built-in 32GB and an inserted 16GB) changed to read-only.

First symptom was that camera started not taking pictures saying "Operation
failed", but now I see in Backup application "Memory card or destination folder
is read-only. Insert a different card or change folder"