* MMC/SD cards hotplug scenario
@ 2008-05-21 6:12 Madhusudhan Chikkature Rajashekar
2008-05-21 7:30 ` Russell King - ARM Linux
0 siblings, 1 reply; 9+ messages in thread
From: Madhusudhan Chikkature Rajashekar @ 2008-05-21 6:12 UTC (permalink / raw)
To: 'Pierre Ossman'; +Cc: linux-arm-kernel, linux-omap
Hi Pierre/All,
I have a query regarding one of the MMC/SD cards hotplug use case scenario and its expected behavior.
In the case where the MMC/SD card is removed physically from the slot during an active data transfer happening on the card, I notice
lot of
I/O errors being generated. The numbers of I/O errors seem to depend on the size of the file being copied(the errors semm to be a
mixture of FS + MMC core errors). After the end of the I/O errors I can umount the partition that was mounted and I reinsert the
card. It seem not to work very well consistently. I mean some times the card removal/insertion does seem to work that well. Whereas
card insertion/removal works perfectly fine if tested when no data transfer is happening.
Does MMC/SD core need to handle some things to support this scenario? Does MMC/SD core handle this scenario gracefully? Has anyone
tried something similar before?
As far as I understand this type of scenario can not be handled well in the controller drivers alone. Am I missing something here?
Regards,
Madhu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MMC/SD cards hotplug scenario
2008-05-21 6:12 MMC/SD cards hotplug scenario Madhusudhan Chikkature Rajashekar
@ 2008-05-21 7:30 ` Russell King - ARM Linux
2008-05-21 9:31 ` Madhusudhan Chikkature Rajashekar
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2008-05-21 7:30 UTC (permalink / raw)
To: Madhusudhan Chikkature Rajashekar
Cc: 'Pierre Ossman', linux-omap, linux-arm-kernel
On Wed, May 21, 2008 at 11:42:04AM +0530, Madhusudhan Chikkature Rajashekar wrote:
> After the end of the I/O errors I can umount the partition that was
> mounted and I reinsert the card.
That's rather expected - outstanding IO has to be errored when the
medium is removed.
> It seem not to work very well consistently.
Vague handwaving comment with no useful information. What precisely is
the problem that you're seeing?
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: MMC/SD cards hotplug scenario
2008-05-21 7:30 ` Russell King - ARM Linux
@ 2008-05-21 9:31 ` Madhusudhan Chikkature Rajashekar
2008-05-21 18:32 ` Pierre Ossman
0 siblings, 1 reply; 9+ messages in thread
From: Madhusudhan Chikkature Rajashekar @ 2008-05-21 9:31 UTC (permalink / raw)
To: 'Russell King - ARM Linux'
Cc: 'Pierre Ossman', linux-omap, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]
> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk]
> Sent: Wednesday, May 21, 2008 1:00 PM
> To: Madhusudhan Chikkature Rajashekar
> Cc: 'Pierre Ossman'; linux-omap@vger.kernel.org;
> linux-arm-kernel@lists.arm.linux.org.uk
> Subject: Re: MMC/SD cards hotplug scenario
>
> On Wed, May 21, 2008 at 11:42:04AM +0530, Madhusudhan
> Chikkature Rajashekar wrote:
> > After the end of the I/O errors I can umount the partition that was
> > mounted and I reinsert the card.
>
> That's rather expected - outstanding IO has to be errored when the
> medium is removed.
Yes. I got your point. But can this be made to through few I/O errors and stop instead of resulting in I/O errors for the rest of
the data?
In the case where data copied is huge, for eg 500MB, the I/O errors are quite lot.
>
> > It seem not to work very well consistently.
>
> Vague handwaving comment with no useful information. What
> precisely is
> the problem that you're seeing?
>
What I meant here is that reinsertion of the card does not seem to result in reinitialization of the card consistently.
Details of few things I noticed is listed below stepwise and to start with card is detected and mounted on mount point /mnt/mmc dir.
1. Start copy of data.
2. Removed the card in the middle of transfer. At the controller driver level this generated card removed interrupt. The
mmc_detect_change fn called.
3. I/O Errors generated.
4. Reinsert the card. This generated card inserted interrupt. The mmc_detect_fn called. But the card does not seem to be
reinitialized correctly.
cat /proc/partitions does not list mmc partitions.
The attached log shows that out of 3 trails, it seem to work fine correctly 2 times and failed the third time.
So my question is for the above scenario does the MMC/SD core need to take care of anything explicitely or should this be fixed at
the controller
driver level?
Regards,
Madhu
[-- Attachment #2: MMC-Hp-Log.txt --]
[-- Type: text/plain, Size: 35311 bytes --]
p -a \b \b\b \b\b \b\b \b\b \bcp -a /etc/ /mnt/mmc/
+++++++++++++++++++++++++++++ MMC CARD REMOVED +++++++++++++++++++++++++
mmc0: card 981b removed
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 3928
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 48
Buffer I/O error on device mmcblk0p1, logical block 4
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
WARNING: at fs/buffer.c:1169 mark_buffer_dirty()
[<c0033400>] (dump_stack+0x0/0x14) from [<c00d21ac>] (mark_buffer_dirty+0x44/0xb8)
[<c00d2168>] (mark_buffer_dirty+0x0/0xb8) from [<c0108ae4>] (group_adjust_blocks+0x38/0x3c)
r5:00000008 r4:00000000
[<c0108aac>] (group_adjust_blocks+0x0/0x3c) from [<c0109778>] (ext2_new_blocks+0x3fc/0x5cc)
[<c010937c>] (ext2_new_blocks+0x0/0x5cc) from [<c010d100>] (ext2_get_block+0x2bc/0x69c)
[<c010ce44>] (ext2_get_block+0x0/0x69c) from [<c00d2f70>] (__block_prepare_write+0x18c/0x414)
[<c00d2de4>] (__block_prepare_write+0x0/0x414) from [<c00d32e4>] (block_write_begin+0x90/0x108)
[<c00d3254>] (block_write_begin+0x0/0x108) from [<c010cdf4>] (__ext2_write_begin+0x3c/0x48)
[<c010cdb8>] (__ext2_write_begin+0x0/0x48) from [<c010ce3c>] (ext2_write_begin+0x3c/0x44)
[<c010ce00>] (ext2_write_begin+0x0/0x44) from [<c009185c>] (generic_file_buffered_write+0x10c/0x5f0)
[<c0091750>] (generic_file_buffered_write+0x0/0x5f0) from [<c0092168>] (__generic_file_aio_write_nolock+0x428/0x478)
[<c0091d40>] (__generic_file_aio_write_nolock+0x0/0x478) from [<c009222c>] (generic_file_aio_write+0x74/0xe8)
[<c00921b8>] (generic_file_aio_write+0x0/0xe8) from [<c00b08d0>] (do_sync_write+0xbc/0x10c)
[<c00b0814>] (do_sync_write+0x0/0x10c) from [<c00b11b8>] (vfs_write+0xb8/0x148)
[<c00b1100>] (vfs_write+0x0/0x148) from [<c00b1784>] (sys_write+0x44/0x70)
r7:00001000 r6:c7c1ff20 r5:00000000 r4:00000000
[<c00b1740>] (sys_write+0x0/0x70) from [<c002ee60>] (ret_fast_syscall+0x0/0x2c)
r8:c002f66c r7:00000004 r6:00000004 r5:be8aa148 r4:00001000
end_request: I/O error, dev mmcblk0, sector 1048592
Buffer I/O error on device mmcblk0p1, logical block 131072
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1048600
Buffer I/O error on device mmcblk0p1, logical block 131073
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1048608
Buffer I/O error on device mmcblk0p1, logical block 131074
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1048616
Buffer I/O error on device mmcblk0p1, logical block 131075
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1048624
Buffer I/O error on device mmcblk0p1, logical block 131076
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1048632
Buffer I/O error on device mmcblk0p1, logical block 131077
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1064976
end_request: I/O error, dev mmcblk0, sector 1064984
end_request: I/O error, dev mmcblk0, sector 1064992
end_request: I/O error, dev mmcblk0, sector 1065000
end_request: I/O error, dev mmcblk0, sector 1065008
end_request: I/O error, dev mmcblk0, sector 1065016
end_request: I/O error, dev mmcblk0, sector 1065024
end_request: I/O error, dev mmcblk0, sector 1065032
end_request: I/O error, dev mmcblk0, sector 1065040
end_request: I/O error, dev mmcblk0, sector 1065048
end_request: I/O error, dev mmcblk0, sector 1065056
end_request: I/O error, dev mmcblk0, sector 1065064
end_request: I/O error, dev mmcblk0, sector 1065072
end_request: I/O error, dev mmcblk0, sector 1065080
end_request: I/O error, dev mmcblk0, sector 1065088
end_request: I/O error, dev mmcblk0, sector 1065096
cp: cannot create regular file `/mnt/mmc/etc/init.d/mvltd': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/init.d/ssh': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/init.d/ppp': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/init.d/wu-ftpd': Input/EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
output error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create directory `/mnt/mmc/etc/rc.d': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/prelink.conf': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: EXT2-fs error (device mmcblk0p1): read_inode_bitmap: cannot create regular file `/mntCannot read inode bitmap - bloc
k_group = 4, inode_bitmap = 131073/mmc/etc/locale.alias': Input/ou
tput error
cp: cannot create directory `/mnt/mmc/etc/hotplug.d': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/shells': Input/output eEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
rror
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/shells.conf': Input/ou
tCannot read inode bitmap - block_group = 4, inode_bitmap = 131073put error
cp: cannot create regular file `/mnt/mmc/etc/ftpusers': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/hosts.equiv': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create regular file `/mnt/mmc/etc/pam.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 4, inode_bitmap = 131073
cp: cannot create directory `/mnt/mmc/etc/wu-ftpd': Input/output error
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 94371840 73954940 20416900 79% /
/dev/root 94371840 73954940 20416900 79% /
tmpfs 62816 0 62816 0% /tmp
/dev/root 94371840 73954940 20416900 79% /dev/.static/dev
none 10240 792 9448 8% /dev
tmpfs 62816 0 62816 0% /dev/shm
/dev/mmcblk0p1 976368 536 926236 1% /mnt/mmc
root@omap:~# umount /mnt/mmc
printk: 138 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=62192, block=131077
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=62113, block=131075
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=62081, block=131074
root@omap:~#
root@omap:~#
root@omap:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 94371840 73954940 20416900 79% /
/dev/root 94371840 73954940 20416900 79% /
tmpfs 62816 0 62816 0% /tmp
/dev/root 94371840 73954940 20416900 79% /dev/.static/dev
none 10240 792 9448 8% /dev
tmpfs 62816 0 62816 0% /dev/shm
root@omap:~#
root@omap:~#
root@omap:~#
+++++++++++++++++++++++++++++ MMC CARD INSERTED +++++++++++++++++++++++++
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card at address 981b
mmcblk0: mmc0:981b SU01G 992000KiB
mmcblk0: p1
root@omap:~#
root@omap:~#
root@omap:~# f
-bash: f: command not found
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# mount /dev/mmcblk0p1 /mnt/mmc
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
root@omap:~#
root@omap:~#
root@omap:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 94371840 73954940 20416900 79% /
/dev/root 94371840 73954940 20416900 79% /
tmpfs 62816 0 62816 0% /tmp
/dev/root 94371840 73954940 20416900 79% /dev/.static/dev
none 10240 800 9440 8% /dev
tmpfs 62816 0 62816 0% /dev/shm
/dev/mmcblk0p1 976368 20 926752 1% /mnt/mmc
root@omap:~#
root@omap:~#
root@omap:~# cp -a /etc/ /mnt/mmc/
+++++++++++++++++++++++++++++ MMC CARD REMOVED +++++++++++++++++++++++++
mmc0: card 981b removed
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 3928
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 48
printk: 1 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 4
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1572880
Buffer I/O error on device mmcblk0p1, logical block 196608
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572888
Buffer I/O error on device mmcblk0p1, logical block 196609
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572896
Buffer I/O error on device mmcblk0p1, logical block 196610
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572904
Buffer I/O error on device mmcblk0p1, logical block 196611
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572912
Buffer I/O error on device mmcblk0p1, logical block 196612
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572920
Buffer I/O error on device mmcblk0p1, logical block 196613
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572928
Buffer I/O error on device mmcblk0p1, logical block 196614
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572936
end_request: I/O error, dev mmcblk0, sector 1572944
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1622032
end_request: I/O error, dev mmcblk0, sector 1622040
end_request: I/O error, dev mmcblk0, sector 1622048
end_request: I/O error, dev mmcblk0, sector 1622056
end_request: I/O error, dev mmcblk0, sector 1622064
end_request: I/O error, dev mmcblk0, sector 1622072
end_request: I/O error, dev mmcblk0, sector 1622080
end_request: I/O error, dev mmcblk0, sector 1622088
end_request: I/O error, dev mmcblk0, sector 1622096
end_request: I/O error, dev mmcblk0, sector 1622104
end_request: I/O error, dev mmcblk0, sector 1622112
end_request: I/O error, dev mmcblk0, sector 1622120
end_request: I/O error, dev mmcblk0, sector 1622128
end_request: I/O error, dev mmcblk0, sector 1622136
end_request: I/O error, dev mmcblk0, sector 1622144
end_request: I/O error, dev mmcblk0, sector 1622152
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1572888
mmcblk0: error -110 sending read/write command
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/squid.conf': Input/out
pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create regular file `/mnt/mmc/etc/watchdog.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/syslog.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/inittab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/ypserv.conf': Input/ou
tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put error
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/wgetrc': Input/output
eCannot read inode bitmap - block_group = 6, inode_bitmap = 196609rror
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/cron.d': Input/output err
oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/cron.hourly': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ypserv.securenets': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/nsswitch.conf.nis': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/yp.conf': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/checksecurity.conf': I
nCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put/output error
cp: cannot create directory `/mnt/mmc/etc/cron.monthly': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create directory `/mnt/mmc/etc/security': Input/output erEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ror
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/crontab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/login.access': Input/o
uCannot read inode bitmap - block_group = 6, inode_bitmap = 196609tput error
cp: cannot create regular file `/mnt/mmc/etc/environment': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/limits': Input/output eEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
rror
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/email-addresses': Inpu
tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609/output error
cp: cannot create regular file `/mnt/mmc/etc/login.defs': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/securetty': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/anacrontab': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/aliases': Input/output
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609error
cp: cannot create directory `/mnt/mmc/etc/exim': Input/output errorEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpchroot': Input/outpuEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
t error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpusers': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/hosts.equiv': Input/ou
tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put error
cp: cannot create regular file `/mnt/mmc/etc/pam.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create directory `/mnt/mmc/etc/wu-ftpd': Input/output error
root@omap:~#
root@omap:~#
root@omap:~# umount /mnt/mmc
printk: 119 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93121, block=196610
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
root@omap:~#
root@omap:~#
root@omap:~#
+++++++++++++++++++++++++++++ MMC CARD INSERTED +++++++++++++++++++++++++
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card at address 981b
mmcblk0: mmc0:981b SU01G 992000KiB
mmcblk0: p1
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# mount /dev/mmcblk0 \b \bp1 /mnt/mmc
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
root@omap:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 94371840 73954976 20416864 79% /
/dev/root 94371840 73954976 20416864 79% /
tmpfs 62816 0 62816 0% /tmp
/dev/root 94371840 73954976 20416864 79% /dev/.static/dev
none 10240 800 9440 8% /dev
tmpfs 62816 0 62816 0% /dev/shm
/dev/mmcblk0p1 976368 20 926752 1% /mnt/mmc
root@omap:~# cp -a /etc/ /mnt/mmc/
+++++++++++++++++++++++++++++ MMC CARD REMOVED +++++++++++++++++++++++++
mmc0: card 981b removed
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 3928
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 48
Buffer I/O error on device mmcblk0p1, logical block 4
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 16
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 24
Buffer I/O error on device mmcblk0p1, logical block 1
lost page write due to I/O error on mmcblk0p1
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1572880
Buffer I/O error on device mmcblk0p1, logical block 196608
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572888
Buffer I/O error on device mmcblk0p1, logical block 196609
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572896
Buffer I/O error on device mmcblk0p1, logical block 196610
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572904
Buffer I/O error on device mmcblk0p1, logical block 196611
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572912
Buffer I/O error on device mmcblk0p1, logical block 196612
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572920
Buffer I/O error on device mmcblk0p1, logical block 196613
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572928
Buffer I/O error on device mmcblk0p1, logical block 196614
lost page write due to I/O error on mmcblk0p1
end_request: I/O error, dev mmcblk0, sector 1572936
end_request: I/O error, dev mmcblk0, sector 1572944
end_request: I/O error, dev mmcblk0, sector 1572952
mmcblk0: error -110 sending read/write command
end_request: I/O error, dev mmcblk0, sector 1622032
end_request: I/O error, dev mmcblk0, sector 1622040
end_request: I/O error, dev mmcblk0, sector 1622048
end_request: I/O error, dev mmcblk0, sector 1622056
end_request: I/O error, dev mmcblk0, sector 1622064
end_request: I/O error, dev mmcblk0, sector 1622072
end_request: I/O error, dev mmcblk0, sector 1622080
end_request: I/O error, dev mmcblk0, sector 1622088
end_request: I/O error, dev mmcblk0, sector 1622096
end_request: I/O error, dev mmcblk0, sector 1622104
end_request: I/O error, dev mmcblk0, sector 1622112
end_request: I/O error, dev mmcblk0, sector 1622120
end_request: I/O error, dev mmcblk0, sector 1622128
end_request: I/O error, dev mmcblk0, sector 1622136
end_request: I/O error, dev mmcblk0, sector 1622144
end_request: I/O error, dev mmcblk0, sector 1622152
mmcblk0: error -110 sending read/write command
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/udhcpc': Input/output err
oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/dnrd': Input/output errorEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/sysctl.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/auto.master': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/auto.misc': Input/outp
uCannot read inode bitmap - block_group = 6, inode_bitmap = 196609t error
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/devfs': Input/output erro
rCannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/pcmcia': Input/output err
oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/cups': Input/output errorEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/dhcpd.conf': Input/out
pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/discover.d': Input/output
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609error
cp: cannot create regular file `/mnt/mmc/etc/nscd.conf': Input/outpuEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
t error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/mime.conf.default': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hostapd.accept': Input/EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hostapd.conf': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hostapd.deny': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/memstat.conf': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/modprobe.conf': Input/oEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
utput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/modprobe.devfs': Input/EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/modules': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/inetd.conf': Input/out
pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create regular file `/mnt/mmc/etc/identd.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/radvd.conf': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/mime.conf': Input/outpuEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
t error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/squid.conf.default': I
nCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put/output error
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/squid.conf': Input/out
pCannot read inode bitmap - block_group = 6, inode_bitmap = 196609ut error
cp: cannot create regular file `/mnt/mmc/etc/watchdog.conf': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/syslog.conf': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/inittab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/ypserv.conf': Input/ou
tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put error
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/wgetrc': Input/output
eCannot read inode bitmap - block_group = 6, inode_bitmap = 196609rror
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/cron.d': Input/output err
oCannot read inode bitmap - block_group = 6, inode_bitmap = 196609r
cp: cannot create directory `/mnt/mmc/etc/cron.hourly': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ypserv.securenets': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/nsswitch.conf.nis': InpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut/output error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/yp.conf': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/checksecurity.conf': I
nCannot read inode bitmap - block_group = 6, inode_bitmap = 196609put/output error
cp: cannot create directory `/mnt/mmEXT2-fs error (device mmcblk0p1): read_inode_bitmap: c/etc/cron.monthly': Input/outp
uCannot read inode bitmap - block_group = 6, inode_bitmap = 196609t error
cp: cannot create directory `/mnt/mmc/etc/security': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/crontab': Input/output EXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/login.access': Input/ouEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
tput error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/environment': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/limits': Input/output eEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
rror
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/email-addresses': Inpu
tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609/output error
cp: cannot create regular file `/mnt/mmc/etc/login.defs': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/securetty': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/anacrontab': Input/outpEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
ut error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/aliases': Input/output
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609error
cp: cannot create directory `/mnt/mmc/etc/exim': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpchroot': Input/output error
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/ftpusers': Input/outputEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mnt/mmc/etc/hosts.equiv': Input/outEXT2-fs error (device mmcblk0p1): read_inode_bitmap:
put error
Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
cp: cannot create regular file `/mntEXT2-fs error (device mmcblk0p1): read_inode_bitmap: /mmc/etc/pam.conf': Input/outpu
tCannot read inode bitmap - block_group = 6, inode_bitmap = 196609 error
cp: cannot create directory `/mnt/mmc/etc/wu-ftpd': Input/output error
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~#
root@omap:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 94371840 73954976 20416864 79% /
/dev/root 94371840 73954976 20416864 79% /
tmpfs 62816 0 62816 0% /tmp
/dev/root 94371840 73954976 20416864 79% /dev/.static/dev
none 10240 792 9448 8% /dev
tmpfs 62816 0 62816 0% /dev/shm
/dev/mmcblk0p1 976368 872 925900 1% /mnt/mmc
root@omap:~# umount /mnt/mmc
printk: 124 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93369, block=196617
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93367, block=196617
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93121, block=196610
root@omap:~#
+++++++++++++++++++++++++++++ MMC CARD INSERTED +++++++++++++++++++++++++
root@omap:~#
root@omap:~# cat /proc/partitions
major minor #blocks name
31 0 256 mtdblock0
31 1 256 mtdblock1
31 2 2048 mtdblock2
31 3 128512 mtdblock3
31 4 512 mtdblock4
31 5 512 mtdblock5
31 6 256 mtdblock6
31 7 4096 mtdblock7
31 8 125696 mtdblock8
31 9 512 mtdblock9
31 10 256 mtdblock10
31 11 128 mtdblock11
31 12 2048 mtdblock12
31 13 259200 mtdblock13
root@omap:~#
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MMC/SD cards hotplug scenario
2008-05-21 9:31 ` Madhusudhan Chikkature Rajashekar
@ 2008-05-21 18:32 ` Pierre Ossman
2008-05-22 13:40 ` Madhusudhan Chikkature Rajashekar
2008-05-22 19:46 ` Syed Mohammed, Khasim
0 siblings, 2 replies; 9+ messages in thread
From: Pierre Ossman @ 2008-05-21 18:32 UTC (permalink / raw)
To: Madhusudhan Chikkature Rajashekar
Cc: 'Russell King - ARM Linux', linux-omap, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
On Wed, 21 May 2008 15:01:00 +0530
"Madhusudhan Chikkature Rajashekar" <madhu.cr@ti.com> wrote:
> What I meant here is that reinsertion of the card does not seem to result in reinitialization of the card consistently.
Previously, that has always been because of bad interactions with the
block layer. 2.6.24 should be more resilient though.
>
> Details of few things I noticed is listed below stepwise and to start with card is detected and mounted on mount point /mnt/mmc dir.
>
> 1. Start copy of data.
> 2. Removed the card in the middle of transfer. At the controller driver level this generated card removed interrupt. The
> mmc_detect_change fn called.
> 3. I/O Errors generated.
The obscene amount of noise here seems to be caused by ext2 being
extremely persistent. This is generally a good thing for your data
though. :)
What is missing is a decent way for a block device to tell the upper
layers that is gone with no hope of ever coming back. Right now we just
tell it that there was a write error, which just makes the upper layers
retry and retry.
> 4. Reinsert the card. This generated card inserted interrupt. The mmc_detect_fn called. But the card does not seem to be
> reinitialized correctly.
> cat /proc/partitions does not list mmc partitions.
>
Anything in dmesg?
>
> So my question is for the above scenario does the MMC/SD core need to take care of anything explicitely or should this be fixed at
> the controller
> driver level?
Host drivers shouldn't have to bother with any of this for the simple
reason that there should be no state inside the driver except for the
current request. Keeping track of cards and block devices are handled
in the core and mmc_block respectively.
Rgds
Pierre
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: MMC/SD cards hotplug scenario
2008-05-21 18:32 ` Pierre Ossman
@ 2008-05-22 13:40 ` Madhusudhan Chikkature Rajashekar
2008-06-01 10:03 ` Pierre Ossman
2008-05-22 19:46 ` Syed Mohammed, Khasim
1 sibling, 1 reply; 9+ messages in thread
From: Madhusudhan Chikkature Rajashekar @ 2008-05-22 13:40 UTC (permalink / raw)
To: 'Pierre Ossman'
Cc: 'Russell King - ARM Linux', linux-omap, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 2550 bytes --]
> -----Original Message-----
> From: Pierre Ossman [mailto:drzeus@drzeus.cx]
> Sent: Thursday, May 22, 2008 12:02 AM
> To: Madhusudhan Chikkature Rajashekar
> Cc: 'Russell King - ARM Linux'; linux-omap@vger.kernel.org;
> linux-arm-kernel@lists.arm.linux.org.uk
> Subject: Re: MMC/SD cards hotplug scenario
>
> On Wed, 21 May 2008 15:01:00 +0530
> "Madhusudhan Chikkature Rajashekar" <madhu.cr@ti.com> wrote:
>
> > What I meant here is that reinsertion of the card does not
> seem to result in reinitialization of the card consistently.
>
> Previously, that has always been because of bad interactions with the
> block layer. 2.6.24 should be more resilient though.
>
> >
> > Details of few things I noticed is listed below stepwise
> and to start with card is detected and mounted on mount point
> /mnt/mmc dir.
> >
> > 1. Start copy of data.
> > 2. Removed the card in the middle of transfer. At the
> controller driver level this generated card removed interrupt. The
> > mmc_detect_change fn called.
> > 3. I/O Errors generated.
>
> The obscene amount of noise here seems to be caused by ext2 being
> extremely persistent. This is generally a good thing for your data
> though. :)
>
> What is missing is a decent way for a block device to tell the upper
> layers that is gone with no hope of ever coming back. Right
> now we just
> tell it that there was a write error, which just makes the
> upper layers
> retry and retry.
>
> > 4. Reinsert the card. This generated card inserted
> interrupt. The mmc_detect_fn called. But the card does not seem to be
> > reinitialized correctly.
> > cat /proc/partitions does not list mmc partitions.
> >
>
> Anything in dmesg?
>
> >
> > So my question is for the above scenario does the MMC/SD
> core need to take care of anything explicitely or should this
> be fixed at
> > the controller
> > driver level?
>
> Host drivers shouldn't have to bother with any of this for the simple
> reason that there should be no state inside the driver except for the
> current request. Keeping track of cards and block devices are handled
> in the core and mmc_block respectively.
>
> Rgds
> Pierre
>
Hi Pierre,
Thanks for the answers.
I am attaching the output of dmesg. I captured dmesg output after I get to the error phrase.
I enabled MMC debugging as well to get some idea. It looks like upon reinsertion of the SD card,
no commands are issued after CMD51. It might be the case where CMD51 (SD_APP_SEND_SCR) fails to read
the SCR for some reason in this scenario.
Regards,
Madhu
[-- Attachment #2: SDCard-Dmesg.txt --]
[-- Type: text/plain, Size: 15833 bytes --]
dmesg
ode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
printk: 142 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
EXT2-fs error (device mmcblk0p1): read_inode_bitmap: Cannot read inode bitmap - block_group = 6, inode_bitmap = 196609
printk: 12 messages suppressed.
Buffer I/O error on device mmcblk0p1, logical block 0
lost page write due to I/O error on mmcblk0p1
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93153, block=196611
EXT2-fs error (device mmcblk0p1): ext2_get_inode: unable to read inode block - inode=93121, block=196610
MMC Card Inserted........
mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0 timing 0
mmc0: starting CMD0 arg 00000000 flags 000000c0
mmci-omap mmci-omap.1: mmc0: CMD0, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
mmc0: starting CMD8 arg 000001aa flags 000002f5
mmci-omap mmci-omap.1: mmc0: CMD8, argument 0x000001aa
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
mmc0: starting CMD5 arg 00000000 flags 000002e1
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req failed (CMD5): -110, retrying...
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req failed (CMD5): -110, retrying...
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req failed (CMD5): -110, retrying...
mmci-omap mmci-omap.1: mmc0: CMD5, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 18000
mmc0: req done (CMD5): -110: 000001aa 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00400120 00000000 00000000 00000000
mmc0: starting CMD41 arg 00000000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 20 width 0 timing 0
mmc0: starting CMD0 arg 00000000 flags 000000c0
mmci-omap mmci-omap.1: mmc0: CMD0, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD0): 0: 00000000 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: starting CMD8 arg 000001aa flags 000002f5
mmci-omap mmci-omap.1: mmc0: CMD8, argument 0x000001aa
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD8): 0: 000001aa 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000120 00000000 00000000 00000000
mmc0: starting CMD41 arg 40300000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x40300000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000120 00000000 00000000 00000000
mmc0: starting CMD41 arg 40300000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x40300000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 00ff8000 00000000 00000000 00000000
mmc0: starting CMD55 arg 00000000 flags 000000f5
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000120 00000000 00000000 00000000
mmc0: starting CMD41 arg 40300000 flags 000000e1
mmci-omap mmci-omap.1: mmc0: CMD41, argument 0x40300000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD41): 0: 80ff8000 00000000 00000000 00000000
mmc0: starting CMD2 arg 00000000 flags 00000067
mmci-omap mmci-omap.1: mmc0: CMD2, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD2): 0: 03534453 55303147 800008e1 b7006cad
mmc0: starting CMD3 arg 00000000 flags 00000075
mmci-omap mmci-omap.1: mmc0: CMD3, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD3): 0: 981b0520 00000000 00000000 00000000
mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 20 width 0 timing 0
mmc0: starting CMD9 arg 981b0000 flags 00000007
mmci-omap mmci-omap.1: mmc0: CMD9, argument 0x981b0000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD9): 0: 00260032 5f5983c8 befbcfff 924040d7
mmc0: starting CMD7 arg 981b0000 flags 00000015
mmci-omap mmci-omap.1: mmc0: CMD7, argument 0x981b0000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD7): 0: 00000700 00000000 00000000 00000000
mmc0: starting CMD55 arg 981b0000 flags 00000095
mmci-omap mmci-omap.1: mmc0: CMD55, argument 0x981b0000
mmci-omap mmci-omap.1: IRQ Status is 1
mmc0: req done (CMD55): 0: 00000920 00000000 00000000 00000000
mmc0: starting CMD51 arg 00000000 flags 000000b5
mmc0: blksz 8 blocks 1 flags 00000200 tsac 100 ms nsac 0
mmci-omap mmci-omap.1: mmc0: CMD51, argument 0x00000000
mmci-omap mmci-omap.1: IRQ Status is 1
root@omap:~#
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: MMC/SD cards hotplug scenario
2008-05-21 18:32 ` Pierre Ossman
2008-05-22 13:40 ` Madhusudhan Chikkature Rajashekar
@ 2008-05-22 19:46 ` Syed Mohammed, Khasim
2008-05-22 20:01 ` Russell King - ARM Linux
1 sibling, 1 reply; 9+ messages in thread
From: Syed Mohammed, Khasim @ 2008-05-22 19:46 UTC (permalink / raw)
To: Pierre Ossman, Chikkature Rajashekar, Madhusudhan
Cc: 'Russell King - ARM Linux', linux-omap@vger.kernel.org
Hi Pierre,
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Pierre
> Ossman
> Sent: Thursday, May 22, 2008 12:02 AM
> To: Chikkature Rajashekar, Madhusudhan
> Cc: 'Russell King - ARM Linux'; linux-omap@vger.kernel.org; linux-arm-kernel@lists.arm.linux.org.uk
> Subject: Re: MMC/SD cards hotplug scenario
>
> On Wed, 21 May 2008 15:01:00 +0530
> "Madhusudhan Chikkature Rajashekar" <madhu.cr@ti.com> wrote:
>
> > What I meant here is that reinsertion of the card does not seem to result in reinitialization of
> the card consistently.
>
> Previously, that has always been because of bad interactions with the
> block layer. 2.6.24 should be more resilient though.
>
> >
<snip>
> The obscene amount of noise here seems to be caused by ext2 being
> extremely persistent. This is generally a good thing for your data
> though. :)
>
> What is missing is a decent way for a block device to tell the upper
> layers that is gone with no hope of ever coming back. Right now we just
> tell it that there was a write error, which just makes the upper layers
> retry and retry.
>
In this scenario, do you think it would be right to kill the ongoing copy from application space, say for example an UI is running for MMC copy and when the card is removed the app gets notified may be through hotplug event or signaling and then app just kills the process that is issuing this copy request. This will prevent long running errors. Just a thought,
Regards,
Khasim
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MMC/SD cards hotplug scenario
2008-05-22 19:46 ` Syed Mohammed, Khasim
@ 2008-05-22 20:01 ` Russell King - ARM Linux
2008-05-22 20:39 ` Igor Stoppa
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2008-05-22 20:01 UTC (permalink / raw)
To: Syed Mohammed, Khasim
Cc: Pierre Ossman, Chikkature Rajashekar, Madhusudhan,
linux-omap@vger.kernel.org
On Fri, May 23, 2008 at 01:16:39AM +0530, Syed Mohammed, Khasim wrote:
> > The obscene amount of noise here seems to be caused by ext2 being
> > extremely persistent. This is generally a good thing for your data
> > though. :)
> >
> > What is missing is a decent way for a block device to tell the upper
> > layers that is gone with no hope of ever coming back. Right now we just
> > tell it that there was a write error, which just makes the upper layers
> > retry and retry.
> >
> In this scenario, do you think it would be right to kill the ongoing
> copy from application space, say for example an UI is running for MMC
> copy and when the card is removed the app gets notified may be through
> hotplug event or signaling and then app just kills the process that is
> issuing this copy request. This will prevent long running errors. Just
> a thought,
If you pick out the errors from 'cp', you'll see that the system is
telling 'cp' that it's getting IO errors. Nevertheless, 'cp' carries
on trying to copy each file (and rightfully so.)
However, there is another issue here - if you're going to be ejecting
a medium containing an ext2fs filesystem at some random point, you
absolutely must run e2fsck before remounting it - the filesystem _will_
be in an inconsistent state at the point you eject the card.
Moreover, I wouldn't be surprised if you keep doing this with a card,
that the card's firmware will eventually get confused and die.
Basically, what I'm trying to say is that ejecting any medium randomly
from the system is _always_ going to result in problems of some nature.
Some of which you can reduce the impact from, others are fairly terminal.
The only safe solution is the unmount, wait for data to be written, and
then eject the card.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MMC/SD cards hotplug scenario
2008-05-22 20:01 ` Russell King - ARM Linux
@ 2008-05-22 20:39 ` Igor Stoppa
0 siblings, 0 replies; 9+ messages in thread
From: Igor Stoppa @ 2008-05-22 20:39 UTC (permalink / raw)
To: ext Russell King - ARM Linux
Cc: Syed Mohammed, Khasim, Pierre Ossman,
Chikkature Rajashekar, Madhusudhan, linux-omap@vger.kernel.org
Hi,
On Thu, 2008-05-22 at 21:01 +0100, ext Russell King - ARM Linux wrote:
> Basically, what I'm trying to say is that ejecting any medium randomly
> from the system is _always_ going to result in problems of some nature.
> Some of which you can reduce the impact from, others are fairly terminal.
> The only safe solution is the unmount, wait for data to be written, and
> then eject the card.
from this point of view it is a watered down version of "what happens
when the power is removed abruptly", which unfortunately cannot really
be avoided on battery powered devices with removable battery.
If the system is supposed to survive such cases, then ext2 is probably
not the best choice and a journaling fs (ext3 ?) should be considered.
With MMC even the way the power fails (vcore fading away before/after
vio) affects the possibility of the embedded uC b0rking. So it needs to
be addressed also at board HW level.
This of course cannot be really controlled when the MMC is removed from
the slot, unless there is a sensor on the MMC lid.
Sensor that could be used for an emergency, controlled powerdown, with
no sync.
But on the Tablets we instead show a warning and tell the user to be
nice and close back the lid: UI designers prefer such approach.
Just my 2 cents.
--
Cheers, Igor
---
Igor Stoppa
Nokia Devices R&D - Helsinki
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MMC/SD cards hotplug scenario
2008-05-22 13:40 ` Madhusudhan Chikkature Rajashekar
@ 2008-06-01 10:03 ` Pierre Ossman
0 siblings, 0 replies; 9+ messages in thread
From: Pierre Ossman @ 2008-06-01 10:03 UTC (permalink / raw)
To: Madhusudhan Chikkature Rajashekar
Cc: 'Russell King - ARM Linux', linux-omap, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 676 bytes --]
On Thu, 22 May 2008 19:10:10 +0530
"Madhusudhan Chikkature Rajashekar" <madhu.cr@ti.com> wrote:
>
> I am attaching the output of dmesg. I captured dmesg output after I get to the error phrase.
> I enabled MMC debugging as well to get some idea. It looks like upon reinsertion of the SD card,
> no commands are issued after CMD51. It might be the case where CMD51 (SD_APP_SEND_SCR) fails to read
> the SCR for some reason in this scenario.
This looks like a driver/hw bug. CMD51 is the first data command in the
init sequence, so the data engine of either the driver or hardware
seems to be wedged. So it's not something related to the MMC core.
Rgds
Pierre
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-06-01 10:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 6:12 MMC/SD cards hotplug scenario Madhusudhan Chikkature Rajashekar
2008-05-21 7:30 ` Russell King - ARM Linux
2008-05-21 9:31 ` Madhusudhan Chikkature Rajashekar
2008-05-21 18:32 ` Pierre Ossman
2008-05-22 13:40 ` Madhusudhan Chikkature Rajashekar
2008-06-01 10:03 ` Pierre Ossman
2008-05-22 19:46 ` Syed Mohammed, Khasim
2008-05-22 20:01 ` Russell King - ARM Linux
2008-05-22 20:39 ` Igor Stoppa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox