continua (next page) main index My Fujitsu-Stylistic ST5022 pages are here!

Well, I don't need a SmartCard reader. But the O2Micro reader can also accept SD/MMC cards, and MemoryStick cards. If I use it, then I will not need the "5-in-1 PCMCIA adapter" in the external PCMCIA slot.

First, let's insert a common SD/MMC card in the slot, and ask for a cat /proc/interrupts to see what happens here:
  0:      45422    XT-PIC-XT        timer
  1:         14    XT-PIC-XT        i8042
  2:          0    XT-PIC-XT        cascade
  3:          4    XT-PIC-XT        pata_pcmcia
  4:        548    XT-PIC-XT        serial
  5:          7    XT-PIC-XT        fsc_btns
  7:          3    XT-PIC-XT      
  8:          2    XT-PIC-XT        rtc
  9:          6    XT-PIC-XT        acpi
 10:          3    XT-PIC-XT      
 11:      97473    XT-PIC-XT        yenta, yenta, yenta, Intel 82801DB-ICH4,
Intel 82801DB-ICH4 Modem, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3,
ehci_hcd:usb4, ipw2200, ohci1394, eth1, i915@pci:0000:00:02.0
 12:        114    XT-PIC-XT        i8042
 14:      24393    XT-PIC-XT        libata
 15:          0    XT-PIC-XT        libata

Wow. A bunch of peripherals uses IRQ11 (PCMCIA, internal audio+modem, USB ports, MiniPCI, ethernet, Firewire, graphics card). Other peripherals have their own IRQ line. Noticeably, the ozscrlx driver source says that must use IRQ4 and must not share it.

After loading the o2scr.ko module, and having pata_pcmcia support already in the kernel, let's see the output of pccardctl info and lspcmcia -v with everything in. We will find that the Stylistic ST5022 has actually three PCMCIA "slots"; the first is the real slot available to the user; the other two are internal and are connected to the O2Micro circuitry (a SmartCard reader and a MemoryCard reader; the latter is actually connected to its external click-and-eject slot which has memorystick and securedigital icons around it).

The pccardctl info reports:
PRODID_2="SmartCardBus Reader"
PRODID_2="MemoryCardBus ATA"

The lspcmcia -v reports:
Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0a.0)
        Configuration:  state: on       ready: yes
Socket 1 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0a.1)
        Configuration:  state: on       ready: yes
                        Voltage: 5.0V Vcc: 5.0V Vpp: 5.0V
Socket 1 Device 0:      [ozscrlx_cs]            (bus ID: 1.0)
        Configuration:  state: on
        Product Name:   O2Micro SmartCardBus Reader V1.0 
        Identification: manf_id: 0xffff card_id: 0x0001
                        prod_id(1): "O2Micro" (0x97299583)
                        prod_id(2): "SmartCardBus Reader" (0xb8501ba9)
                        prod_id(3): "V1.0" (0xe611e659)
                        prod_id(4): --- (---)
Socket 2 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:0a.3)
        Configuration:  state: on       ready: yes
                        Voltage: 3.3V Vcc: 3.3V Vpp: 0.0V
Socket 2 Device 0:      [pata_pcmcia]           (bus ID: 2.0)
        Configuration:  state: on
        Product Name:   O2Micro MemoryCardBus ATA V1.1 
        Identification: manf_id: 0xffff card_id: 0x0001
                        function: 4 (fixed disk)
                        prod_id(1): "O2Micro" (0x97299583)
                        prod_id(2): "MemoryCardBus ATA" (0xc8c67efd)
                        prod_id(3): "V1.1" (0x9116d6cf)
                        prod_id(4): --- (---)

Since a SD/MMC card is in, the "function 4 (fixed disk)" appears there, using 3.3V, in state "ready". Good. But... why doesn't the disk appear in /dev or /proc or other? The dmesg output doesn't add any line when I place/replace the MMC card.

Let's try again ejecting/inserting the reader: pccardctl eject 2 ; pccardctl insert 2 (a few lines appear in the dmesg output)... and, after four minutes (!!!) I get a message "port is slow...":
[  294.722921] ata3: PATA max PIO0 cmd 0x120 ctl 0x12e irq 3
[  545.814247] ata3: port is slow to respond, please be patient (Status 0x90)
[  550.796189] ata3: device not ready (errno=-16), forcing hardreset

From cat /proc/devices I see that the SD/MMC driver (named "mmc"; don't care the "sd" of the same devices list because they mean "scsi-like disk") is a block-device with major number 179. So I create the device file with mknod /dev/mmc b 179 0 and tried to cat it, getting -alas!- only "no such device or address" errors, even changing the minor number.

Trying to insert the SD in a "5-in-1" reader placed in the external PCMCIA slot, I see that it works using the same pata_pcmcia driver and the SCSI-style disk interface ("sd"):
[  570.654117] pcmcia: registering new device pcmcia0.0
[  570.661759] scsi2 : pata_pcmcia
[  570.662027] ata4: PATA max PIO0 cmd 0x120 ctl 0x12e irq 3
[  571.076781] ata4.00: CFA: 5in1 Adapter, F0.218, max PIO2
[  571.076790] ata4.00: 990976 sectors, multi 0: LBA 
[  571.110338] sd 2:0:0:0: [sdb] 990976 512-byte hardware sectors (507 MB)

That is: same ports, same IRQ, same pata_pcmcia driver, uses the SCSI subsection (so that it appears as /media/sdb*) and gets seen as a common hard disk.

Duh... I don't know yet how to go on. No device appears in /dev - neither I see anything happen in the dmesg messages or /sys and /proc directories.

Click here for helicopters!

home page - send e-mail - continua (next page)