Reading/writing old PCMCIA Pfaff pattern card

Message
Author
GreySpike
Posts: 1
Joined: Sun Apr 25, 2021 1:15 pm

Reading/writing old PCMCIA Pfaff pattern card

#1 Post by GreySpike »

(apologies if this is double post. I tried yesterday but now can't find my post)
After 20 years my wife has now decided to make use of the embroidery function on her Pfaff 7570 sewing machine. This uses PCMCIA cards to store the patterns, and of course are no longer available.

I need to be able to read patterns from the card, and write new patterns to either the same card or a blank PCMCIA card; if it requires a custom driver then I'm probably out of option but it may just be a simple storage card. After all why bother to invent something custom when there is already a solution available?

However I am new to configuring Linux to this level and am stuck in working out what needs to be loaded and how I configure Linux to recognise the card and (force) load the appropriate driver.
I tried following the David Hinds PCMCIA write up at https://tldp.org/HOWTO/PCMCIA-HOWTO.html but this is for a very old kernel.

The only config change I have made so far is to /etc/pcmcia/config.opts to add the memory window and ports obtained by lspci.
Added

Code: Select all

# Toshiba Tecra PCMCIA slot
include memory 0xc4000000-0xc7ffffff
include memory 0xc8000000-0xcbffffff

include port 0x1000-0x10ff
include port 0x1400-0x14ff


Any help gratefully received.

Tech specs:

Code: Select all

System:    Host: pfaff Kernel: 4.19.0-16-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0
           parameters: BOOT_IMAGE=/boot/vmlinuz-4.19.0-16-amd64 root=UUID=7c5b1bf3-86ac-4518-8cc9-4b724b47d4d4 ro quiet splash
           Console: tty 1 dm: LightDM 1.26.0 Distro: MX-19.4_x64 patito feo March 31  2021 base: Debian GNU/Linux 10 (buster)
Machine:   Type: Laptop System: TOSHIBA product: TECRA A9 v: PTS52E-0ES02LEN serial: <filter> Chassis: type: 10 v: Version 1.0
           serial: <filter>
           Mobo: TOSHIBA model: Portable PC v: Version A0 serial: <filter> BIOS: TOSHIBA v: Version 1.90 date: 12/25/2007
Battery:   ID-1: BAT1 charge: 43.4 Wh condition: 43.4/55.1 Wh (79%) volts: 11.3/10.8 model: G71C00084A10 type: Li-ion
           serial: <filter> status: Full
CPU:       Topology: Dual Core model: Intel Core2 Duo T5270 bits: 64 type: MCP arch: Core Merom family: 6 model-id: F (15)
           stepping: D (13) microcode: A4 L2 cache: 2048 KiB
           flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 5585
           Speed: 798 MHz min/max: 800/1401 MHz boost: enabled Core speeds (MHz): 1: 798 2: 798
           Vulnerabilities: Type: itlb_multihit status: KVM: Vulnerable
           Type: l1tf mitigation: PTE Inversion
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
           Type: meltdown mitigation: PTI
           Type: spec_store_bypass status: Vulnerable
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Full generic retpoline, STIBP: disabled, RSB filling
           Type: srbds status: Not affected
           Type: tsx_async_abort status: Not affected
Graphics:  Device-1: Intel Mobile GM965/GL960 Integrated Graphics vendor: Toshiba America Info Systems driver: i915 v: kernel
           bus ID: 00:02.0 chip ID: 8086:2a02
           Display: server: X.org 1.20.4 driver: intel tty: 134x83
           Message: Advanced graphics data unavailable in console. Try -G --display
Audio:     Device-1: Intel 82801H HD Audio vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel
           bus ID: 00:1b.0 chip ID: 8086:284b
           Sound Server: ALSA v: k4.19.0-16-amd64
Network:   Device-1: Intel 82566MC Gigabit Network vendor: Toshiba America Info Systems driver: e1000e v: 3.2.6-k port: cf80
           bus ID: 00:19.0 chip ID: 8086:104d
           IF: eth0 state: down mac: <filter>
           Device-2: Intel PRO/Wireless 3945ABG [Golan] Network driver: iwl3945 v: in-tree:s port: aee0 bus ID: 01:00.0
           chip ID: 8086:4222
           IF: wlan0 state: up mac: <filter>
Drives:    Local Storage: total: 149.05 GiB used: 5.94 GiB (4.0%)
           ID-1: /dev/sda vendor: Hitachi model: HTS542516K9SA00 size: 149.05 GiB block size: physical: 512 B logical: 512 B
           speed: 1.5 Gb/s serial: <filter> rev: C32P scheme: MBR
Partition: ID-1: / raw size: 49.05 GiB size: 48.03 GiB (97.92%) used: 5.94 GiB (12.4%) fs: ext4 dev: /dev/sda2
Sensors:   System Temperatures: cpu: 36.0 C mobo: N/A
           Fan Speeds (RPM): N/A
Repos:     No active apt repos in: /etc/apt/sources.list
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
           1: deb http://deb.debian.org/debian buster-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list
           1: deb http://deb.debian.org/debian buster main contrib non-free
           2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list
           1: deb http://mxlinux.mirrors.uk2.net/packages/mx/repo/ buster main non-free
           No active apt repos in: /etc/apt/sources.list.d/various.list
Info:      Processes: 182 Uptime: 1d 6h 46m Memory: 1.94 GiB used: 903.1 MiB (45.5%) Init: SysVinit v: 2.93 runlevel: 5
           default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: bash v: 5.0.3 running in: tty 1 (SSH) inxi: 3.0.36

Code: Select all

$ pccardctl ls
Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:05:0b.0)

Code: Select all

$ pccardctl info
PRODID_1=""
PRODID_2=""
PRODID_3=""
PRODID_4=""
MANFID=0000,0000
FUNCID=255

Code: Select all

$ dmesg | grep "yenta\|pcmcia"
[   12.464365] yenta_cardbus 0000:05:0b.0: enabling device (0000 -> 0003)
[   12.464491] yenta_cardbus 0000:05:0b.0: CardBus bridge found [1179:0001]
[   12.464514] yenta_cardbus 0000:05:0b.0: Enabling burst memory read transactions
[   12.464520] yenta_cardbus 0000:05:0b.0: Using CSCINT to route CSC interrupts to PCI
[   12.464523] yenta_cardbus 0000:05:0b.0: Routing CardBus interrupts to PCI
[   12.464530] yenta_cardbus 0000:05:0b.0: TI: mfunc 0x01aa1022, devctl 0x64
[   12.716873] yenta_cardbus 0000:05:0b.0: ISA IRQ mask 0x0cf8, PCI irq 20
[   12.716878] yenta_cardbus 0000:05:0b.0: Socket status: 30000006
[   12.716887] yenta_cardbus 0000:05:0b.0: pcmcia: parent PCI bridge window: [io  0x1000-0x1fff]
[   12.716891] yenta_cardbus 0000:05:0b.0: pcmcia: parent PCI bridge window: [mem 0xc0000000-0xd7ffffff]
[   12.716894] pcmcia_socket pcmcia_socket0: cs: memory probe 0xc0000000-0xd7ffffff:
[   15.185892] pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0fffff:
[   15.185944] pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff:
[   15.186001] pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff:
[   15.186075] pcmcia_socket pcmcia_socket0: cs: memory probe 0xc4000000-0xc7ffffff:
[   15.186110] pcmcia_socket pcmcia_socket0: cs: memory probe 0xc8000000-0xcbffffff:
[  600.628210] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
[  600.628221] pcmcia_socket pcmcia_socket0: cs: memory probe 0x0d0000-0x0dffff:
[  600.743857] pcmcia_socket pcmcia_socket0: cs: memory probe 0xc0800000-0xc3ffffff:
[  600.947431] pcmcia_socket pcmcia_socket0: cs: memory probe 0xcc000000-0xd7ffffff:
[23372.309351] yenta_cardbus 0000:05:0b.0: CardBus bridge to [bus 06]
[23372.309359] yenta_cardbus 0000:05:0b.0:   bridge window [io  0x1000-0x10ff]
[23372.309369] yenta_cardbus 0000:05:0b.0:   bridge window [io  0x1400-0x14ff]
[23372.309379] yenta_cardbus 0000:05:0b.0:   bridge window [mem 0xc4000000-0xc7ffffff pref]
[23372.309388] yenta_cardbus 0000:05:0b.0:   bridge window [mem 0xc8000000-0xcbffffff]

Code: Select all

$ sudo lspci -s 05:0b.0 -v
05:0b.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
        Subsystem: Toshiba America Info Systems PCIxx12 Cardbus Controller
        Physical Slot: 0
        Flags: bus master, medium devsel, latency 168, IRQ 20
        Memory at c0000000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=05, secondary=06, subordinate=06, sec-latency=176
        Memory window 0: c4000000-c7ffffff (prefetchable)
        Memory window 1: c8000000-cbffffff
        I/O window 0: 00001000-000010ff
        I/O window 1: 00001400-000014ff
        16-bit legacy interface ports at 0001
        Capabilities: [a0] Power Management version 2
        Kernel driver in use: yenta_cardbus
        Kernel modules: yenta_socket

Return to “Hardware /Configuration”