Subject: Re: Kingmax KEN0100-AF
To: David Laight <David@l8s.co.uk>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-kern
Date: 01/20/2002 16:27:50
On Sat, Jan 19, 2002 at 08:33:03PM -0000, David Laight wrote:
> The problem here is the io address 0x4300, you need to track down where it
> comes from.

Trying to find out where the 0x4300 in sc_pcioh.addr comes from which makes
    if ((last_liobase == psc->sc_pcioh.addr)
        || (last_liobase != new_liobase))
fail (*_liobase=0x300):

pcmcia0: CIS version unknown (major=1, minor=0)
pcmcia0: CIS info: PCMCIA, 10/100 Ethernet Card, , 
pcmcia0: Manufacturer code 0x8a01, product 0xc1ab
pcmcia0: function 0: network adapter, ccr addr 3c0 mask 63
pcmcia0: function 0, config table entry 7: I/O card; irq mask ffff; iomask a, iospace 300-31f; mwait_required io16 irqlevel
ne0 at pcmcia0 function 0
before pcmcia_io_alloc() tag: 0 handle:     0 addr: 0x0+0     flags: 0x0
after  pcmcia_io_alloc() tag: 0 handle: 17152 addr: 0x4300+32 flags: 0x0

So pcmcia_io_alloc() fills in the addr as 0x4300.

#define pcmcia_io_alloc(pf, start, size, align, pciop)                  \
        (pcmcia_chip_io_alloc((pf)->sc->pct, pf->sc->pch, (start),      \
         (size), (align), (pciop)))

#define pcmcia_chip_io_alloc(tag, handle, start, size, align, pcihp)    \
        ((*(tag)->io_alloc)((handle), (start), (size), (align), (pcihp)))

Now I get lost. Is io_alloc() built into the card? Are these functions:

CISTPL_CFTABLE_ENTRY
 1b 0b c7 81 19 07 55 4d 5d 65 30 ff ff
CISTPL_CFTABLE_ENTRY
 1b 07 07 08 ca 60 00 03 1f
CISTPL_CFTABLE_ENTRY
 1b 07 07 08 ca 60 20 03 1f
CISTPL_CFTABLE_ENTRY
 1b 07 07 08 ca 60 40 03 1f
CISTPL_CFTABLE_ENTRY
 1b 07 07 08 ca 60 60 03 1f
CISTPL_CFTABLE_ENTRY
 1b 07 07 08 ca 60 00 02 1f
CISTPL_CFTABLE_ENTRY
 1b 07 07 08 ca 60 20 02 1f
CISTPL_FUNCID
 21 02 06 00
 22 02 01 02
 22 02 02 64
 22 02 03 01

?

Do we still believe that that check is correct?

Cheers,

Patrick