can't write/read to isa-card using ioperm, iow, ior

From: Marcus (mschneller_at_swissonline.ch)
Date: 08/27/03


Date: 27 Aug 2003 00:30:34 -0700

Dear Hardware-Experts

I have an PnP-ISA-Card installed in my PC, but do have problems
reading/writing from/to the card.

/proc/isapnp says:

Card 1 'BUR0020:BUR PCIO' PnP version 1.0
Logical device 0 'BUR0000:Unknown'
Supported registers 0x2
Device is active
Active port 0x220
Active IRQ 5
Active DMA ,0
Resources 0
Priority acceptable
Port 0x200-0xffe0, align 0x1f, size 0x20, 16-bit address decoding IRQ
3,4,5,6,7,2/9,10,11,12,14,15 High-Edge

My interpretation is that the Base Address is 0x220.

proc/ioports says:

0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
0213-0213 : isapnp read
02f8-02ff : serial(auto)
0378-037a : parport0
037b-037f : parport0
03c0-03df : vesafb
03f6-03f6 : ide0
03f8-03ff : serial(auto)
0a79-0a79 : isapnp write
0cf8-0cff : PCI conf1
4000-403f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI
5000-501f : Intel Corp. 82371AB/EB/MB PIIX4 ACPI
e000-e01f : Intel Corp. 82371AB/EB/MB PIIX4 USB
  e000-e01f : usb-uhci
e400-e43f : Intel Corp. 82559ER
  e400-e43f : eepro100
f000-f00f : Intel Corp. 82371AB/EB/MB PIIX4 IDE
  f000-f007 : ide0

What do the addresses isapnp write/read mean? Why do theydon't match
0x220?

I'm using ioperm to get permission to read/write to the card as
follows (I'm root):

int initPort()
{
        if(iIOAddr == 0) //iIOAddr is 0x220
                return 1;

        return ioperm(iIOAddr, 0x20, 1);
}

Reading(writing is done as follows:

void readIOw(uint16 iOffset, uint16 *iVal) {
        if (iVal == NULL) {
                printf("readIOw: can't write to null pointer\n");
                return;
        }
        *iVal = inw(iIOAddr + iOffset);
        //usleep(1);
}

void writeIOw(uint16 iOffset, uint16 iVal) {
        outw(iVal, iIOAddr + iOffset);
        //usleep(1);
}

Well, to be short, it doesn't work. readIOw always returns 0xffff,
which shouldn't be.

The same Card works fine under Tornado/vxWorks using the same
mechanisms. Therefore the I think the addresses are correct and it
might be a Linux realated problem.

Any help is really welcome

Marcus
Content Security by MailMarshal



Relevant Pages

  • cant write/read to isa-card using ioperm, iow, ior
    ... Logical device 0 'BUR0000:Unknown' ... Active DMA,0 ... 0a79-0a79: isapnp write ... I'm using ioperm to get permission to read/write to the card as ...
    (comp.os.linux.hardware)
  • Re: 3C515 - Knoppix 5 - setup
    ... pnpdump shows the card as well. ... that the I/O and IRQ match what isapnp is setting the card to. ... ifconfig does not show eth0 as an option ... iface lo inet loopback ...
    (comp.os.linux.setup)
  • vanilla 2.6.0-test11 and CS4236 card
    ... I'm having problems getting the CS4236+ driver to recognize my ... CS4236B card. ... isapnp: Scanning for PnP cards... ...
    (Linux-Kernel)
  • Re: Configuring a SupraExpress 56K modem
    ... I'm trying to configure the modem in order to connect the ... Yes No ISA Ian Vaughan ... but it is an ISA PnP card only. ... isapnp: ...
    (comp.os.linux.hardware)
  • Re: vanilla 2.6.0-test11 and CS4236 card
    ... > CS4236B card. ... > isapnp: Scanning for PnP cards... ... > but the ALSA driver doesn't pick it up. ...
    (Linux-Kernel)