Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 2002 10:03:23 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        dirkx@webweaving.org
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Understanding PCI intr routing on a Cirrus Logic PD6729
Message-ID:  <20021127.100323.111035160.imp@bsdimp.com>
In-Reply-To: <20021127111749.V2484-100000@foem.leiden.webweaving.org>
References:  <20021127111749.V2484-100000@foem.leiden.webweaving.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20021127111749.V2484-100000@foem.leiden.webweaving.org>
            Dirk-Willem van Gulik <dirkx@webweaving.org> writes:
: I've got a "Compaq" "WL200_11Mbps_Wireless_PCI_Card" here. This is a PCI
: card with a CL-PD6729 pci<->pcmcia bridge on it.

You poor bastard.  The 6729 is a many magical and wonderful beast
that's different in subtle and not so subtle ways from all other
parts.

: The trouble is either a hang on detection (when pd6729_intr_path=2 is
: used)  or a Timeout (with pd6729_intr_path=1/default) when trying to use
: this card with either 4.6 or -CURRENT.

-current has a better chance of working, but it is still busted.  You
definitely want pd6729_intr_path=2.  In my testing I've almost gotten
this card to work, but never completely. :-(

: Now it seems that all 4 PCI interrupt pins #A to #D of the PD6729 as well
: as IRQ9-12 are all wired together and all are routed to the same INT#A pin
: on the PCI bus.
:
: The INT#B, C and D pints of the PCI bus are not connected to anything.
: 
: Now what exactly does this mean ?
: 
: Should all PCI cards and their PCMCIA children all share the same IRQ and
: use polling only ?

Yes and no.

: How is that configured ? As I am guessing that any of
: the IRQ setup by /sys/pccard/pcic_pci.c is rather ignored by having the
: wiring on the physical card all going to #A ?

In theory, you'd set the pd6729_intr_path to 2.  However, there's
still some stubtle bug that precludes this wfrom working.

Well, right now the following code is trying to force INTA#:

	/*
	 * Ohterwise we're doing PCI interrupts.  For those cardbus bridges
	 * that follow yenta (and the one pcmcia bridge that does), we don't
	 * do a thing to get the IRQ mapped into the system.  However,
	 * for other controllers that are PCI, but not yetna compliant, we
	 * need to do some special mapping.
	 *
	 * XXX Maybe we shouldn't assume INTA#, but rather as the function
	 * XXX what Intline to use.
	 */
	if (sp->controller == PCIC_PD6729) {
		/*
		 * INTA - 3
		 * INTB - 4
		 * INTC - 5
		 * INTD - 7
		 */
		sp->putb(sp, PCIC_INT_GEN,	/* Assume INTA# */
		    (sp->getb(sp, PCIC_INT_GEN) & 0xF0) | 3);
		return (0);
	}

This doesn't force the interrupt to be IRQ3, but rather tells the card
to use INTA#.  The probe line for wi card should say irq N where N is
the same as the bridge's irq.

I don't suppose you could enable a serial console and use that to get
me a dmesg?  I'll help you debug this, but am a little busy with 5.0
issues right now to take another swing at it.

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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