Skip to contentSkip to conversation

MTD - DOC 2000 freezes on umount

DISCUSSION Mark Richards 3 participants 12 messages Jan 20, 2004 – Jan 23, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

I've been through several good learning experiences getting my development system set up to work with a DOC 2000 for an embedded project. I've finally settled on a RedHat 7.2 distribution and the 2.4.24 kernel. All worked well with the MTD drivers in several other setups: RedHat 9, Mandrake 9.2, but for reasons I can't yet fathom, the MTD drivers seem a bit unstable in this particular kernel.

Most frequently when I perform a umount /mnt/doc (doc being the mount point) the shell session freezes (the umount command does not return a prompt).

If I then perform a sfdisk -l /dev/nftla the command again goes off into space with no return data.

Then the shut down hangs up.

I tried in one kernel build to apply the latest sources to my source tree using the instructions (and the shell script) but this caused a compile failure.

May I have some suggestions as to how I can further diagnose this problem, or what I can do to provide information that will help?

Many thanks,

Mark

#1 lore raw

Update... I have also discovered that sometimes the first umount works, but a subsequent umount (preceded of course by a mount) also freezes. In addition, I also get an occasional freeze-up when issuing the mount command.

If I don't umount at the commandline, but instead call a reboot, the file system umounts fine - question: since I have mounted the MTD manually, is it considered part of the file system to be umounted when the machine shuts down?

This is more a nuisance, as are the occasional freeze-ups I experience just accessing the DOC once mounted, but since it's a departure from the previous good performance, perhaps it's worth looking into?

Mark Richards

Quoted 42 lines

-----Original Message-----
From: [email protected] [mailto:linux-mtd- [email protected]] On Behalf Of Mark Richards
Sent: Monday, January 19, 2004 21:23
To: [email protected]
Subject: MTD - DOC 2000 freezes on umount

I've been through several good learning experiences getting my development system set up to work with a DOC 2000 for an embedded project. I've finally
settled on a RedHat 7.2 distribution and the 2.4.24 kernel. All worked well
with the MTD drivers in several other setups: RedHat 9, Mandrake 9.2, but for reasons I can't yet fathom, the MTD drivers seem a bit unstable in this
particular kernel.

Most frequently when I perform a umount /mnt/doc (doc being the mount point)
the shell session freezes (the umount command does not return a prompt).

If I then perform a sfdisk -l /dev/nftla the command again goes off into space with no return data.

Then the shut down hangs up.

I tried in one kernel build to apply the latest sources to my source tree using the instructions (and the shell script) but this caused a compile failure.

May I have some suggestions as to how I can further diagnose this problem, or what I can do to provide information that will help?

Many thanks,

Mark

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

#2 lore raw
In reply to Mark Richards
Quoted 9 lines · Mark Richards

I've been through several good learning experiences getting my development system set up to work with a DOC 2000 for an embedded project. I've finally settled on a RedHat 7.2 distribution and the 2.4.24 kernel. All worked well with the MTD drivers in several other setups: RedHat 9, Mandrake 9.2, but for reasons I can't yet fathom, the MTD drivers seem a bit unstable in this particular kernel.

Most frequently when I perform a umount /mnt/doc (doc being the mount point) the shell session freezes (the umount command does not return a prompt).

Hit SysRq-P and/or SysRq-T to see precisely where it's locked up.

Quoted 3 lines

I tried in one kernel build to apply the latest sources to my source tree using the instructions (and the shell script) but this caused a compile failure.

Insufficient information to diagnose.

Signature · 1 line
dwmw2
#3 lore raw

David,

Thanks much for the reply and especially for all your hard work on these drivers. I was pleased to find them as my beginning work with DOC was difficult using what the vendor has provided.

Quoted 1 line

Hit SysRq-P and/or SysRq-T to see precisely where it's locked up.

Invoking sysrq is ineffective. Seems sysrq was not configured. I searched my last .config used for the kernel build and there's no instance of SYSRQ there.

I'll build again and then be able to tell you more as my problem is reproducible.

I also see this in bootup:

Possible DiskOnChip with unknown ChipID 00 found at 0xc8000 Possible DiskOnChip with unknown ChipID B2 found at 0xca000 Possible DiskOnChip with unknown ChipID 83 found at 0xcc000 Possible DiskOnChip with unknown ChipID FF found at 0xce000 Possible DiskOnChip with unknown ChipID 85 found at 0xd0000 Possible DiskOnChip with unknown ChipID BD found at 0xd2000 DiskOnChip Millennium found at address 0xD4000
Flash chip found: Manufacturer ID: 98, Chip ID: E6 (Toshiba:NAND 8MB 3,3V) 1 flash chips found. Total DiskOnChip size: 8 MiB
mtd: Giving out device 0 to DiskOnChip Millennium
Possible DiskOnChip with unknown ChipID BD found at 0xd6000 Possible DiskOnChip with unknown ChipID FF found at 0xd8000 Possible DiskOnChip with unknown ChipID FF found at 0xda000 Possible DiskOnChip with unknown ChipID FF found at 0xdc000 Possible DiskOnChip with unknown ChipID FF found at 0xde000 Possible DiskOnChip with unknown ChipID FF found at 0xe0000 Possible DiskOnChip with unknown ChipID FF found at 0xe2000 Possible DiskOnChip with unknown ChipID FF found at 0xe4000 Possible DiskOnChip with unknown ChipID FF found at 0xe6000 Possible DiskOnChip with unknown ChipID FF found at 0xe8000 Possible DiskOnChip with unknown ChipID FF found at 0xea000 Possible DiskOnChip with unknown ChipID FF found at 0xec000 Possible DiskOnChip with unknown ChipID FF found at 0xee000 $Id: ftl.c,v 1.45 2003/01/24 23:31:27 dwmw2 Exp $
ftl_cs: FTL header not found.
NFTL driver: nftlcore.c $Revision: 1.87 $, nftlmount.c $Revision: 1.31 $
nftla: nftla1
usb.c: registered new driver hub

I don't believe I've seen " ftl_cs: FTL header not found." in my previous builds.

Sorry, I don't know enough about the file systems to know if this is normal. Does it look ok to you?

Regarding the compile error, when I build for the sysrq I'll also apply the latest MTD source to the new source tree for 2.4.24 and let you know specifically what I find.

Mark Richards

Quoted 35 lines

-----Original Message-----
From: David Woodhouse [mailto:[email protected]]
Sent: Tuesday, January 20, 2004 09:07
To: Mark Richards
Cc: [email protected]
Subject: Re: MTD - DOC 2000 freezes on umount

Quoted 1 line · Mark Richards

I've been through several good learning experiences getting my

development

Quoted 1 line

system set up to work with a DOC 2000 for an embedded project. I've

finally

Quoted 1 line

settled on a RedHat 7.2 distribution and the 2.4.24 kernel. All worked

well

Quoted 1 line

with the MTD drivers in several other setups: RedHat 9, Mandrake 9.2,

but

Quoted 1 line

for reasons I can't yet fathom, the MTD drivers seem a bit unstable in

this

Quoted 3 lines

particular kernel.

Most frequently when I perform a umount /mnt/doc (doc being the mount

point)

Quoted 1 line

the shell session freezes (the umount command does not return a prompt).

Hit SysRq-P and/or SysRq-T to see precisely where it's locked up.>

Quoted 1 line

I tried in one kernel build to apply the latest sources to my source

tree

Quoted 2 lines

using the instructions (and the shell script) but this caused a compile failure.

Insufficient information to diagnose.

--
dwmw2

#4 lore raw
In reply to David Woodhouse

David,

This may now be better referenced under a different subject line perhaps, but here goes...

I set up a fresh source tree in order that I might enable SYSRQ and build with the very latest MTD drivers.

1. Got latest via CVS
2. In the mtd/patches/ directory, ran:
sh patchin.sh /usr/src/linux
3. Then put in my current .config file into /usr/src/linux (link to my new source tree) and ran make xconfig.

The following happened:
[root@localhost linux]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24.new.mtd/scripts' cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk drivers/mtd/chips/Config.in: 14: unknown command make[1]: *** [kconfig.tk] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/scripts'
make: *** [xconfig] Error 2

It appeared that something was mangled by running patchin. So I created a new tree and first ran make xconfig, which worked fine, then applied patchin and then ran make xconfig again.

Here's the sequence:

[root@localhost linux]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24.new.mtd/scripts' gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkparse.o tkparse.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkcond.o tkcond.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkgen.o tkgen.c gcc -o tkparse tkparse.o tkcond.o tkgen.o
cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk
echo "set defaults \"arch/i386/defconfig\"" >> kconfig.tk
echo "set ARCH \"i386\"" >> kconfig.tk
cat tail.tk >> kconfig.tk
chmod 755 kconfig.tk
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/scripts' wish -f scripts/kconfig.tk
[root@localhost linux]# cd ../mtd
[root@localhost mtd]# ls

boot     drivers  grub     INSTALL  Makefile            patches
COPYING  ffs2     html     kernel   mtd-jffs-HOWTO.txt  README
CVS      fs       include  lib      obsolete            util

[root@localhost mtd]# cd patches [root@localhost patches]# sh patchin.sh /usr/src/linux Patching /usr/src/linux
Include Filesytems: no
Zlib-Patch needed: no
Method: Link
Can we start now ? [y/N]y

Patching MTD
drivers/mtd
drivers/mtd/chips
drivers/mtd/devices
drivers/mtd/maps
drivers/mtd/nand
include/linux/mtd
Patching done
Please update Documentation/Configure.help from /usr/src/mtd/Documentation/Configure.help [root@localhost patches]# cd ../linux
bash: cd: ../linux: No such file or directory [root@localhost patches]# cd ../..
[root@localhost src]# cd linux
[root@localhost linux]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24.new.mtd/scripts' cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk drivers/mtd/chips/Config.in: 14: unknown command make[1]: *** [kconfig.tk] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/scripts'
make: *** [xconfig] Error 2 [root@localhost linux]#

Is it something I'm missing? My kernel sources are the 2.4.24 (latest).

Mark Richards

Quoted 36 lines

-----Original Message-----
From: David Woodhouse [mailto:[email protected]]
Sent: Tuesday, January 20, 2004 09:07
To: Mark Richards
Cc: [email protected]
Subject: Re: MTD - DOC 2000 freezes on umount

Quoted 1 line · Mark Richards

I've been through several good learning experiences getting my

development

Quoted 1 line

system set up to work with a DOC 2000 for an embedded project. I've

finally

Quoted 1 line

settled on a RedHat 7.2 distribution and the 2.4.24 kernel. All worked

well

Quoted 1 line

with the MTD drivers in several other setups: RedHat 9, Mandrake 9.2,

but

Quoted 1 line

for reasons I can't yet fathom, the MTD drivers seem a bit unstable in

this

Quoted 3 lines

particular kernel.

Most frequently when I perform a umount /mnt/doc (doc being the mount

point)

Quoted 1 line

the shell session freezes (the umount command does not return a prompt).

Hit SysRq-P and/or SysRq-T to see precisely where it's locked up.

Quoted 1 line

I tried in one kernel build to apply the latest sources to my source

tree

Quoted 2 lines

using the instructions (and the shell script) but this caused a compile failure.

Insufficient information to diagnose.

--
dwmw2

#5 lore raw
Quoted 1 line · Mark Richards

drivers/mtd/chips/Config.in: 14: unknown command

Try 'make oldconfig' instead.

Signature · 1 line
dwmw2
#6 lore raw

Thank you that worked.

I'll let you know what I find as to the freeze problem once the new kernel is in place.

Would you like some text for updating the HOWTO document?

Mark Richards

Quoted 14 lines

-----Original Message-----
From: David Woodhouse [mailto:[email protected]]
Sent: Tuesday, January 20, 2004 13:11
To: Mark Richards
Cc: [email protected]
Subject: RE: MTD - DOC 2000 freezes on umount

Quoted 1 line · Mark Richards

drivers/mtd/chips/Config.in: 14: unknown command

Try 'make oldconfig' instead.

--
dwmw2

#7 lore raw
In reply to David Woodhouse

David, I ran the kernel build process and, sadly, no joy.

Here's the ending of a long string of various warnings from the compiler as it worked through the MTD code...

gcc -D__KERNEL__ -I/usr/src/linux-2.4.24.new.mtd/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.24.new.mtd/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=write
-c -o write.o write.c
write.c: In function `jffs2_new_inode':
write.c:91: `current' undeclared (first use in this function) write.c:91: (Each undeclared identifier is reported only once write.c:91: for each function it appears in.)
write.c:103: `CURRENT_TIME' undeclared (first use in this function) make[2]: *** [write.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/fs/jffs2' make[1]: *** [_modsubdir_jffs2] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/fs'
make: *** [_mod_fs] Error 2
[root@localhost linux]#

The compile was performed on a new source tree (2.4.24) that had been patched according to instructions and the configuration process operated as recommended.

GCC: 2.96 20000731 (Red Hat 7.1 2.96-98) Specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs

I wonder if I should just re-install RedHat, or is there any hope otherwise??

Mark Richards

Quoted 14 lines

-----Original Message-----
From: David Woodhouse [mailto:[email protected]]
Sent: Tuesday, January 20, 2004 13:11
To: Mark Richards
Cc: [email protected]
Subject: RE: MTD - DOC 2000 freezes on umount

Quoted 1 line · Mark Richards

drivers/mtd/chips/Config.in: 14: unknown command

Try 'make oldconfig' instead.

--
dwmw2

#8 lore raw
In reply to Mark Richards

I got the same problem. I just edited out the offending lines since they did not effect me. I was unable to determine the problem by looking at the contents of the file.

Matthew

Quoted 140 lines · Mark Richards

David,

This may now be better referenced under a different subject line perhaps, but here goes...

I set up a fresh source tree in order that I might enable SYSRQ and build with the very latest MTD drivers.

1. Got latest via CVS
2. In the mtd/patches/ directory, ran:
sh patchin.sh /usr/src/linux
3. Then put in my current .config file into /usr/src/linux (link to my new source tree) and ran make xconfig.

The following happened:
[root@localhost linux]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24.new.mtd/scripts' cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk drivers/mtd/chips/Config.in: 14: unknown command make[1]: *** [kconfig.tk] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/scripts'
make: *** [xconfig] Error 2

It appeared that something was mangled by running patchin. So I created a new tree and first ran make xconfig, which worked fine, then applied patchin and then ran make xconfig again.

Here's the sequence:

[root@localhost linux]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24.new.mtd/scripts' gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkparse.o tkparse.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkcond.o tkcond.c
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkgen.o tkgen.c gcc -o tkparse tkparse.o tkcond.o tkgen.o
cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk
echo "set defaults \"arch/i386/defconfig\"" >> kconfig.tk
echo "set ARCH \"i386\"" >> kconfig.tk
cat tail.tk >> kconfig.tk
chmod 755 kconfig.tk
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/scripts' wish -f scripts/kconfig.tk
[root@localhost linux]# cd ../mtd
[root@localhost mtd]# ls

boot     drivers  grub     INSTALL  Makefile            patches
COPYING  ffs2     html     kernel   mtd-jffs-HOWTO.txt  README
CVS      fs       include  lib      obsolete            util

[root@localhost mtd]# cd patches [root@localhost patches]# sh patchin.sh /usr/src/linux Patching /usr/src/linux
Include Filesytems: no
Zlib-Patch needed: no
Method: Link
Can we start now ? [y/N]y

Patching MTD
drivers/mtd
drivers/mtd/chips
drivers/mtd/devices
drivers/mtd/maps
drivers/mtd/nand
include/linux/mtd
Patching done
Please update Documentation/Configure.help from /usr/src/mtd/Documentation/Configure.help [root@localhost patches]# cd ../linux
bash: cd: ../linux: No such file or directory [root@localhost patches]# cd ../..
[root@localhost src]# cd linux
[root@localhost linux]# make xconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24.new.mtd/scripts' cat header.tk >> ./kconfig.tk
./tkparse < ../arch/i386/config.in >> kconfig.tk drivers/mtd/chips/Config.in: 14: unknown command make[1]: *** [kconfig.tk] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.24.new.mtd/scripts'
make: *** [xconfig] Error 2 [root@localhost linux]#

Is it something I'm missing? My kernel sources are the 2.4.24 (latest).

Mark Richards

Quoted 28 lines

-----Original Message-----
From: David Woodhouse [mailto:[email protected]]
Sent: Tuesday, January 20, 2004 09:07
To: Mark Richards
Cc: [email protected]
Subject: Re: MTD - DOC 2000 freezes on umount

Quoted 1 line · Mark Richards

I've been through several good learning experiences getting my

development

Quoted 1 line

system set up to work with a DOC 2000 for an embedded project. I've

finally

Quoted 1 line

settled on a RedHat 7.2 distribution and the 2.4.24 kernel. All worked

well

Quoted 1 line

with the MTD drivers in several other setups: RedHat 9, Mandrake 9.2,

but

Quoted 1 line

for reasons I can't yet fathom, the MTD drivers seem a bit unstable in

this

Quoted 3 lines

particular kernel.

Most frequently when I perform a umount /mnt/doc (doc being the mount

point)

Quoted 1 line

the shell session freezes (the umount command does not return a prompt).

Hit SysRq-P and/or SysRq-T to see precisely where it's locked up.

Quoted 1 line

I tried in one kernel build to apply the latest sources to my source

Quoted 8 lines

tree

Quoted 2 lines

using the instructions (and the shell script) but this caused a compile failure.

Insufficient information to diagnose.

--
dwmw2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Signature · 1 line
Matthew S. McClintock <[email protected]>
#9 lore raw
Quoted 2 lines · Matthew S. McClintock

I got the same problem. I just edited out the offending lines since they did not effect me.

I sincerely hope you were effected by your parents and not by any form of software :)

Quoted 2 lines

I was unable to determine the problem by looking at
the contents of the file.

Bizarre. It's a define_bool, which is relatively new -- but not so new it's not in 2.4.24, I thought. As you're only interested in the DiskOnChip drivers, you're right that it doesn't affect you (assuming that's what you meant:)

Signature · 1 line
dwmw2
#10 lore raw
Quoted 4 lines · David Woodhouse

Bizarre. It's a define_bool, which is relatively new -- but not so new it's not in 2.4.24, I thought. As you're only interested in the DiskOnChip drivers, you're right that it doesn't affect you (assuming that's what you meant:)

I'm using the linuxppc_2_4_devel tree if that helps any.

Signature · 1 line
Matthew S. McClintock <[email protected]>
#11 lore raw

I finally managed to get a good build running on the 2.4.24 kernel on RedHat 7.2, applying the MTD drivers. Here's what I had to do:

1. Copy the sources (not link them).
2. Include the JFFS drivers.
3. Use make oldconfig (make xconfig is not properly supported by one of the MTD make files)

In a previous try I also had to fix one of the sources which had an extra parameter defined, but in my finally-successful build this problem did not show up.

So the problem I had - lock up when issuing a umount - is resolved, but it was not easy getting there :)

I can't explain why the MTD version that ships with the 2.4.24 kernel has this problem and I can't find any reference to it searching the newsgroups, etc.

Mark Richards

Quoted 18 lines

-----Original Message-----
From: Matthew S. McClintock [mailto:[email protected]]
Sent: Tuesday, January 20, 2004 13:28
To: David Woodhouse
Cc: Mark Richards; [email protected]
Subject: RE: MTD - DOC 2000 freezes on umount

Quoted 4 lines · David Woodhouse

Bizarre. It's a define_bool, which is relatively new -- but not so new it's not in 2.4.24, I thought. As you're only interested in the DiskOnChip drivers, you're right that it doesn't affect you (assuming that's what you meant:)

I'm using the linuxppc_2_4_devel tree if that helps any.

--
Matthew S. McClintock <[email protected]>