SD card I/O errors and corruption

Colin Brace cb at lim.nl
Sat Jun 28 21:27:24 UTC 2008


Hi all,

I am having problems with two Kingston 2GB SD cards. 

My laptop (Asus Aspire 4520) has a built-in card reader:
$ lspci 
01:09.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host
Adapter (rev 22)
01:09.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 12)
01:09.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter
(rev 12)
01:09.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev ff)

Earlier today, I inserted an SD card containing a hundred photos or so.
F-spot tried to import them, but crashed and all my photos were lost. Here
is the error message displayed:

http://img246.imageshack.us/img246/5060/screenshottransferringpjg0.png

I am able to reproduce this crash. Something similar happens when I try to
copy the files from the SD card in Nautilus.

Looking in dmesg outout,each time this happens, there is upwards of 600
lines of error messages. Here is a sample:

[...]
[ 4670.129440] mmcblk0: error -5 sending read/write command
[ 4670.129443] end_request: I/O error, dev mmcblk0, sector 196928
[...]
[ 4670.129477] end_request: I/O error, dev mmcblk0, sector 197048
[ 4670.129635] mmcblk0: error -84 transferring data
[ 4670.129638] end_request: I/O error, dev mmcblk0, sector 197056
[...]
[ 4670.129671] end_request: I/O error, dev mmcblk0, sector 197176
[ 4670.151282] mmc0: Controller never released inhibit bit(s).
[ 4670.151290] sdhci: ============== REGISTER DUMP ==============
[ 4670.151294] sdhci: Sys addr: 0x04fc7000 | Version:  0x00000400
[ 4670.151297] sdhci: Blk size: 0x00007200 | Blk cnt:  0x00000000
[ 4670.151300] sdhci: Argument: 0x00000000 | Trn mode: 0x00000033
[ 4670.151304] sdhci: Present:  0x01ef0006 | Host ctl: 0x00000007
[ 4670.151307] sdhci: Power:    0x0000000f | Blk gap:  0x00000000
[ 4670.151310] sdhci: Wake-up:  0x00000000 | Clock:    0x00000007
[ 4670.151313] sdhci: Timeout:  0x00000009 | Int stat: 0x00000000
[ 4670.151316] sdhci: Int enab: 0x00ff00fb | Sig enab: 0x00ff00fb
[ 4670.151319] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 4670.151323] sdhci: Caps:     0x016121a1 | Max curr: 0x00000040
[ 4670.151324] sdhci: ===========================================
[ 4670.151342] mmcblk0: error -5 sending read/write command
[ 4670.151345] end_request: I/O error, dev mmcblk0, sector 196944
[ 4670.164991] mmc0: Controller never released inhibit bit(s).
[ 4670.164998] sdhci: ============== REGISTER DUMP ==============
[ 4670.165002] sdhci: Sys addr: 0x04fc8000 | Version:  0x00000400
[ 4670.165005] sdhci: Blk size: 0x00007200 | Blk cnt:  0x00000000
[ 4670.165008] sdhci: Argument: 0x00000000 | Trn mode: 0x00000033
[ 4670.165012] sdhci: Present:  0x018f0006 | Host ctl: 0x00000007
[ 4670.165015] sdhci: Power:    0x0000000f | Blk gap:  0x00000000
[ 4670.165018] sdhci: Wake-up:  0x00000000 | Clock:    0x00000007
[ 4670.165021] sdhci: Timeout:  0x00000009 | Int stat: 0x00000000
[ 4670.165024] sdhci: Int enab: 0x00ff00fb | Sig enab: 0x00ff00fb
[ 4670.165027] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 4670.165031] sdhci: Caps:     0x016121a1 | Max curr: 0x00000040
[ 4670.165032] sdhci: ===========================================
[ 4670.165061] mmcblk0: error -5 sending read/write command
[ 4670.165064] end_request: I/O error, dev mmcblk0, sector 196952
[ 4670.167939] mmcblk0: error -84 transferring data
[ 4670.167944] end_request: I/O error, dev mmcblk0, sector 196952
[ 4716.600216] mmc0: Controller signalled completion even though there were
blocks left.
[ 4716.600229] WARNING: at
/build/buildd/linux-2.6.24/drivers/mmc/host/sdhci.c:569 sdhci_send_command()
[ 4716.600233] Pid: 9005, comm: mmcqd Tainted: P        2.6.24-19-generic #1
[ 4716.600258]  [<f8a5384c>] sdhci_send_command+0x47c/0x500 [sdhci]
[ 4716.600284]  [<f8a54170>] sdhci_irq+0x590/0x5c0 [sdhci]
[ 4716.600295]  [<c0121f8f>] update_curr+0x9f/0x150
[ 4716.600318]  [<c01686b0>] handle_IRQ_event+0x30/0x60
[ 4716.600330]  [<c0169e31>] handle_fasteoi_irq+0x71/0xe0
[ 4716.600341]  [<c0106f1b>] do_IRQ+0x3b/0x70
[ 4716.600346]  [<c012e048>] profile_tick+0x48/0x80
[ 4716.600350]  [<c0117bee>] apic_wait_icr_idle+0xe/0x20
[ 4716.600362]  [<c0105413>] common_interrupt+0x23/0x30
[ 4716.600382]  [<c0131d4d>] __do_softirq+0x5d/0x110
[ 4716.600400]  [<c0131e55>] do_softirq+0x55/0x60
[ 4716.600405]  [<c013213d>] irq_exit+0x6d/0x80
[ 4716.600408]  [<c0106f20>] do_IRQ+0x40/0x70
[ 4716.600416]  [<f8a534db>] sdhci_send_command+0x10b/0x500 [sdhci]
[ 4716.600428]  [<c0105413>] common_interrupt+0x23/0x30
[ 4716.600450]  [<c031c46d>] _spin_unlock_irqrestore+0xd/0x20
[ 4716.600460]  [<f8a5d76d>] mmc_wait_for_req+0xcd/0x120 [mmc_core]
[ 4716.600489]  [<f8cda709>] mmc_blk_issue_rq+0x209/0x7b0 [mmc_block]
[ 4716.600503]  [<c0122037>] update_curr+0x147/0x150
[ 4716.600525]  [<f8a5d7c0>] mmc_wait_done+0x0/0x10 [mmc_core]
[ 4716.600586]  [<c0207543>] elv_dispatch_sort+0x23/0xf0
[ 4716.600601]  [<c02124d3>] cfq_dispatch_insert+0x33/0x50
[ 4716.600614]  [<c0212d25>] cfq_dispatch_requests+0x165/0x2f0
[ 4716.600637]  [<c0206faf>] elv_next_request+0xaf/0x1c0
[ 4716.600659]  [<f8cdb16d>] mmc_queue_thread+0x7d/0xe0 [mmc_block]
[ 4716.600670]  [<f8cdb0f0>] mmc_queue_thread+0x0/0xe0 [mmc_block]
[ 4716.600676]  [<c0140982>] kthread+0x42/0x70
[ 4716.600681]  [<c0140940>] kthread+0x0/0x70
[ 4716.600688]  [<c0105677>] kernel_thread_helper+0x7/0x10
[ 4716.600703]  =======================
[ 4716.600756] mmcblk0: error -5 transferring data
[ 4716.600760] end_request: I/O error, dev mmcblk0, sector 215040
[...]

First, I thought it was a damaged SD card, but I have a second identical one
and the same problems ocurr. Strangely enough, I have no problem with the 32
MB card supplied with the camera, a Canon.

Any ideas what is going on here? Is is possible that both (!) 2GB are
damaged? Would it be worth trying to reformat them? 

In the meantime, I will stick to transfering photos via the USB cable.

Thanks.




-----
  Colin Brace
  Amsterdam
  http://lim.nl
-- 
View this message in context: http://www.nabble.com/SD-card-I-O-errors-and-corruption-tp18174948p18174948.html
Sent from the ubuntu-users mailing list archive at Nabble.com.





More information about the ubuntu-users mailing list