Skip to contentSkip to conversation

DOC2000 & NFTL problems

DISCUSSION Ciro Cattuto 3 participants 5 messages Aug 2, 2000 – Aug 4, 2000 1 message not in the archive Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hello,

I decided to give a try to the DOC2000/NFTL driver included in mtd. I have an Eurotech PC104 SBC with a DOC socket. I'm using a 2 Mb DOC2000, enabled in the SBC BIOS and mapped at 0xd8000.

Under DOS everything works fine: the systems detects, identifies and formats the DOC. Everything is also fine with the binary-only Linux driver provided by M-Systems, under Linux 2.0.38.

Next, I try Linux 2.2.16 with the mtd driver and patch.

---------------------------------------------------------------------
M-Systems DiskOnChip driver. (C) 1999 Machine Vision Holdings, Inc. DiskOnChip 2000 found at address 0xD8000
1 flash chips found. Total DiskOnChip size: 2 Mb Ignoring DiskOnChip 2000 at 0xDA000 - already configured M-Systems NAND Flash Translation Layer driver. (C) 1999 MVHI $Id: nftl.c,v 1.37 2000/07/26 10:02:27 dwmw2 Exp $
---------------------------------------------------------------------

...then I get the following message, repeated for all EUNs (0-511)...

---------------------------------------------------------------------
EUN 506: EraseMark not 0x3c69 (0xffff 0xffff instead)
---------------------------------------------------------------------

...and when it comes to detecting the partition, I get:

---------------------------------------------------------------------
nftla: unknown partition table
---------------------------------------------------------------------

NOTE: there _is_ a valid NFTL partition on the DOC, while the above happens.

Okay, now I try to format the DOC using nftl_format: no errors. When I try to fdisk /dev/nftla, though, I get an invalid partition table. Any attempt to write a new partition table results in the following:

---------------------------------------------------------------------
NFTL_writeblock(): Cannot find block to write to
end_request: I/O error, dev 5d:00 (unknown), sector 2 No Virtual Unit Chains available for folding. Failing request Cannot make free space.
---------------------------------------------------------------------

...I'm probably missing something obvious, but I would still appreciate some feedback on this problem. Thank you.

Cheers,

Ciro

Signature · 10 lines
Ciro Cattuto, Open Source Developer, Linuxcare Italia SpA
Tel. +39.338.3002140  Fax +39.049.8036484 
[email protected]    http://www.linuxcare.com/
[email protected]         http://www.prosa.it/
Linuxcare. Support for the revolution.




To unsubscribe, send "unsubscribe mtd" to [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 2 lines · Ollie Lho

It seems that the nftl.c can not find the correct NFTL partition on the DoC, can you use nftldump ??

Here it is. Any ideas?

Ciro

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

 # ./nftldump
 NFTL Media Header found at offset 16000:
 NumEraseUnits:    501
 FirstPhysicalEUN: 11
 Formatted Size:   1998848
 UnitSizeFactor:   0xff
 Second NFTL Media Header found at offset 18000
 EraseMark not present in unit 11: 0
 Unit 11 is free
 EraseMark not present in unit 12: 0
 Unit 12 is free
 EraseMark not present in unit 13: 0
 Unit 13 is free
 EraseMark not present in unit 14: 0
 Unit 14 is free
 EraseMark not present in unit 15: 0
 [...]
 Unit 209 is free
 EraseMark not present in unit 210: 0
 Unit 210 is free
 Unit 211 is free
 EraseMark not present in unit 212: 0
 Unit 212 is free
 EraseMark not present in unit 213: 0
 [...]
 EraseMark not present in unit 463: 0
 Unit 463 is free
 EraseMark not present in unit 464: ffff
 Unit 464 is free
 EraseMark not present in unit 465: 0
 Unit 465 is free
 EraseMark not present in unit 466: 0
 [...]
 EraseMark not present in unit 509: 0
 Unit 509 is free
 EraseMark not present in unit 510: 0
 Unit 510 is free
 EraseMark not present in unit 511: 0
 Unit 511 is free
 Virtual Unit #0: Not present
 Virtual Unit #1: Not present
 Virtual Unit #2: Not present
 Virtual Unit #3: Not present
 Virtual Unit #4: Not present
 [...]
 Virtual Unit #243: Not present
 Virtual Unit #244: Not present
 # 
 --------------------------------------------------------------
Signature · 10 lines
Ciro Cattuto, Open Source Developer, Linuxcare Italia SpA
Tel. +39.338.3002140  Fax +39.049.8036484 
[email protected]    http://www.linuxcare.com/
[email protected]         http://www.prosa.it/
Linuxcare. Support for the revolution.




To unsubscribe, send "unsubscribe mtd" to [email protected]
#3 lore raw
Quoted 41 lines · Ciro Cattuto
Quoted 2 lines · Ollie Lho

It seems that the nftl.c can not find the correct NFTL partition on the DoC, can you use nftldump ??

Here it is. Any ideas?

Ciro

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

 # ./nftldump
 NFTL Media Header found at offset 16000:
 NumEraseUnits:    501
 FirstPhysicalEUN: 11
 Formatted Size:   1998848
 UnitSizeFactor:   0xff
 Second NFTL Media Header found at offset 18000
 EraseMark not present in unit 11: 0
 Unit 11 is free
 EraseMark not present in unit 12: 0
 Unit 12 is free
 EraseMark not present in unit 13: 0
 Unit 13 is free
 EraseMark not present in unit 14: 0
 Unit 14 is free
 EraseMark not present in unit 15: 0
 [...]
 Unit 209 is free
 EraseMark not present in unit 210: 0
 Unit 210 is free
 Unit 211 is free
 EraseMark not present in unit 212: 0
 Unit 212 is free
 EraseMark not present in unit 213: 0
 [...]
 EraseMark not present in unit 463: 0
 Unit 463 is free
 EraseMark not present in unit 464: ffff
 Unit 464 is free
 EraseMark not present in unit 465: 0
Quoted 8 lines
 Unit 465 is free
 EraseMark not present in unit 466: 0
 [...]
 EraseMark not present in unit 509: 0
 Unit 509 is free
 EraseMark not present in unit 510: 0
 Unit 510 is free
 EraseMark not present in unit 511: 0

The DoC is not properly nftl_formatted, or the OOB areas are broken or not correctly accessed by doc2000.c

Ollie

To unsubscribe, send "unsubscribe mtd" to [email protected]

#4 lore raw
Quoted 2 lines · Ollie Lho

The DoC is not properly nftl_formatted, or the OOB areas are broken or not correctly accessed by doc2000.c

That's what I thought. The point is, which one of the above?

The DOC2000 shouldn't be broken, because I can use it without the least problem under DOS _and_ under Linux 2.0.38, with the binary module provided by M-systems (or IGEL, whatever). I will re-try all of this, just to be sure. But given this, what could possibly go wrong with the way doc2000.c accesses OOB areas? This SBC is a common PC104 board manufactured by Eurotech. It features a 386SX, 2 Mb RAM (yes, I'm running Linux in 2 Mb of RAM) and a DOC socket, besides many other devices. It's pretty standard stuff.

I'm confused...

Thank you for you help/hints/whatever :)

Ciro

Signature · 10 lines
Ciro Cattuto, Open Source Developer, Linuxcare Italia SpA
Tel. +39.338.3002140  Fax +39.049.8036484 
[email protected]    http://www.linuxcare.com/
[email protected]         http://www.prosa.it/
Linuxcare. Support for the revolution.




To unsubscribe, send "unsubscribe mtd" to [email protected]
#5 lore raw
In reply to Ollie Lho
Quoted 3 lines · [email protected] said:

EraseMark not present in unit 511: 0
The DoC is not properly nftl_formatted, or the OOB areas are broken or not correctly accessed by doc2000.c

... or setting the EraseMark to zero means it's a bad block, and we don't handle bad blocks yet. That's unlikely, though, given the number of times it's happening.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]