Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jan 1998 18:17:57 +1030
From:      Mike Smith <mike@smith.net.au>
To:        "Sean J. Schluntz" <schluntz@clicknet.com>
Cc:        Mike Smith <mike@smith.net.au>, "Goeringer, Michael" <goeringerm@keywest.ird.rl.af.mil>, freebsd-mobile@FreeBSD.ORG
Subject:   Re: Ach! Slot 0, unfielded interrupt 0 (unbreakable loop) 
Message-ID:  <199801310747.SAA01082@word.smith.net.au>
In-Reply-To: Your message of "Fri, 30 Jan 1998 22:48:34 -0800." <34D2C942.BB402679@clicknet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > > No, I've got it setup for 0x300 and irq 10, I've set those up in the
> > > 3Com utility and have verified that NT sees it that way as well. My
> > > orriginal problem as an unable to allocate driver.
> > 
> > Note that the port and IRQ values in the CIS tuples are purely
> > advisory; they don't affect the operation of the card in any way.
> 
> You mean in the kernel definition or in pccard.conf.  Unfortunately I'm
> not sure what 'CIS tuples' is.

Neither.  A CIS tuple is a piece of parametric information stored in
a PCCARD; these tuples are read by the 'pccardd' program and used to 
configure the pcic to talk to the card.

Unfortunately, the standard that defines these tuples is, er, bogus at 
best, and some of the information in the CIS tuples is pretty weird.

One of the important things to know is that the port and IRQ values are 
(except in a particular special case, which we can ignore), completely 
advisory.  The PCCARD only has *one* interrupt pin; you configure the 
pcic to map this interrupt to the ISA interrupt of your choice.  You 
map the PCCARD's IO and memory spaces independantly of any decoding on 
the card, so again there is no such thing as configuring the PCCARD for 
a given port/memory address.

However, there are CIS tuples which purport to hold this 
information, and one of the major defects in pccardd is that it *uses* 
them.  Most cards offer several different sets of parameters, each has 
a different configuration index and you can select which one of these 
sets to use with the configuration index parameter in pccard.conf.

When you set this parameter, you must ensure that the configuration in 
the PCCARD with that index doesn't specify resources that aren't 
available in the resource declarations at the top of pccard.conf.

Failure to do this will result in a "resource allocation failed for..." 
message.

> > The "driver allocation failed" message means that the 'ep' driver,
> > given the mappings supplied, failed to locate your card.
> > 
> > This may mean that the port range you have specified is actually
> > occupied by other hardware, or that your card is not behaving in a
> > fashion that the 'ep' driver can handle.
> > 
> > You should add some debugging messages to the 'ep' driver's probe
> > routines to determine the cause of the rejection.
> 
> Hm, unfortunately this is a step beyond me.  I can give it a shot, but
> I'm pretty basic when it comes to coding C.

OK, first perhaps you should go back to basics.

Configure 'ep0' into your kernel; just copy it as-is from GENERIC.

Make sure pccardd is *NOT* running.  Insert the card and say 
"pccardc dumpcis".  Look through the output for an entry like this:

Tuple #3, code = 0x15 (Version 1 info), length = 43
    000:  04 01 44 41 4e 50 45 58 00 45 4e 2d 36 32 30 30
    010:  50 32 00 52 65 76 2e 54 31 00 50 43 4d 43 49 41
    020:  20 45 74 68 65 72 6e 65 74 00 ff
        Version = 4.1, Manuf = [DANPEX],card vers = [EN-6200P2]
        Addit. info = [Rev.T1],[PCMCIA Ethernet]

It won't look exactly like this, but what you want is the Manuf and vers
fields.  I think you have these OK already though.

Now look through the output for one like this:

Tuple #8, code = 0x1b (Configuration entry), length = 7
    000:  20 08 ca 60 00 03 1f
        Config index = 0x20
        Card decodes 10 address lines, limited 8/16 Bit I/O
                I/O address # 1: block start = 0x300 block length = 0x20

What you are interested in is the configuration index number (here 
0x20).  The normal entry for the '589 is 0x1, and you want to make sure 
that the I/O address it specifies *is* valid on your system.  If it's 
not, pick another configuration index.

Create an /etc/pccard.conf containing *just* this:

io	0x240-0x360
irq	10

# 3com 3c589D
card "3Com Corporation" "3C589D"
        config 0x1 "ep0" 10
        insert /etc/pccard_ether ep0 -link0
        remove /sbin/ifconfig ep0 delete

Check your laptop's manual for IRQ details, IRQ 10 is normally but not 
always available.  Change the first string to match the "Manuf" 
parameter, and the second to match the "vers" parameter extracted in 
the dumpcis command above.  Change the 0x1 on the 'config' line if 
necessary to select a valid configuration index.

Now start pccardd.

If you still get the "driver allocation failed" messages, you will have 
to do a little hacking.  In the file sys/i386/isa/if_ep.c, there is a 
function ep_pccard_init(), right near the top of the file.  There are 
several places where this function returns ENXIO without printing an 
error message; you should add printf() statements before these returns 
in such a fashion as to be able to tell which one is the one causing 
your allocation to fail.  At this point, it should be possible to 
determine the actual cause of your problem.

I hope this helps.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\ 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801310747.SAA01082>