• Please review our updated Terms and Rules here

PCMCIA Linear Flash Madness

Bob-O-Rama

Experienced Member
Joined
Jan 11, 2022
Messages
99
Location
Allentown, PA, USA, Earth, ...
Hi,

I have a "computer" - its actually a digital carillon system implemented as an embedded system - that uses Y2K era PCMCIA linear flash ( memory mapped ) cards to store music and system backups. These are various models of 1MB ( 1 x8 bit ) linear flash cards. They have various part numbers and likely different chips sets internally. They are all readable by the carillon itself, so are known good.

I tried using a period Windows system on a 20 year old Compaq laptop. I could not get any of the cards to work and tried various tools supposedly able to read linear flash. No dice.

Modern linux, openSUSE with pcmcia services and AMT service to support these memory cards, I got one of the 4 to work - but it looks slightly newer, from 2007, and has a write protect switch. For the one that works, card services sees the card, hotplug kicks in and the AMT driver creates a device file which is easily imaged. For the other 3, it sees a card insertion event, but does not attempt to do anything further.

The device also has a 32MB CF card. But again, it seems to be a linear flash device which cannot be detected by a normal CF reader. Its possible that would work in a sufficiently old CF <--> PCMCIA adapter designed for for linear flash.

Has anyone successfully been able to deal with these cards? I see there is some $600 magic reader that supposedly will, but thats sort of off budget for a complete gamble. My current approach is try to get more of those "working" cards, and use them for system / custom music backup and restore. However without being able to read the original music cards those are at risk.

-- Bob
 
What is the AMT service / driver? I'm not familiar with that.

Two years ago I spent some time looking into reading and writing PCMCIA linear flash cards on a Ubuntu Linux system. I was eventually able to get things set up and working with a desktop system with PCI add-in card CardBus controller.

One of the things I did was to install the mtd-utils package. Another thing I had to do was to make a slight change to the drivers/mtd/chips/cfi_cmdset_0001.c read_pri_intelext() function and rebuild the MTD driver to correct what appears to be a bug that prevents some linear flash cards using some Intel flash devices from working. I forget if I ever tried to report that bug somewhere. Looking at a more recent version of that code, it appears that there have been some minor changes, but it isn't clear from a quick look if those changes would have any impact on the issue I was seeing.

One thing that I found to be helpful was to look at the kernel debug message log. That contained helpful clues on what was going on when a PCMCIA linear flash card was inserted.

I need to get that system set up again and refresh my notes on all of this.
 
Oh yeah, I forgot what might be the most common reason why some PCMCIA linear flash cards might not be recognized on a Linux system and not do anything when you insert them.

Plug and Play for PCMCIA cards normally relies on the cards having a valid CIS (Card Information Structure), which contains a variety of identifying information and resource requirements for the card. Some PCMCIA linear flash cards have a hard coded CIS in the interface logic in the card, while other PCMCIA linear flash cards need the CIS to be written to the main flash memory address space in the card. With the second type of cards, if the main flash memory is completely erased or overwritten, the CIS will no longer be valid.

The Linux PCMCIA driver code in /drivers/pcmcia/ds.c optionally has support for memory cards which do not have a valid CIS, but only when the driver is built with the CONFIG_MTD_PCMCIA_ANONYMOUS option enabled.

When I was last looking a PCMCIA linear flash cards on a Linux system, I had to rebuild the PCMCIA driver with the CONFIG_MTD_PCMCIA_ANONYMOUS option enabled to get several of the cards I had to be recognized and usable by the system.

https://forum.vcfed.org/index.php?threads/75979/post-926316
https://forum.vcfed.org/index.php?threads/75979/post-926318
 
Hi,

Rebuilt kernel with CONFIG_MTD_PCMCIA_ANONYMOUS, and loaded pcmciamtd specifying card_type=1 and card_size=1 (MB) and the problematic card appears as a MTD device, however the data read out is scrambled ( every other byte is 0xFF ) looks like I'm only getting one bank or something. While I get 1MB of data, there isn't much after 0x2FFFF. It could be an 8-bit card. I have no idea what the underlying chipset is. I've been maintaining scripts that automate all the work, so if I can figure this out, others can benefit - for the 3 people left on the planet who care.

-- Bob
 
Back
Top