Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Aug 2001 01:30:41 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        lists <lists@security.za.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: NewCard / pccbb 
Message-ID:  <200108030730.f737UfH62560@harmony.village.org>
In-Reply-To: Your message of "Thu, 02 Aug 2001 14:53:20 %2B0200." <Pine.BSF.4.21.0108021445300.880-100000@security.za.net> 
References:  <Pine.BSF.4.21.0108021445300.880-100000@security.za.net>  

next in thread | previous in thread | raw e-mail | index | archive | help
: wi0: <WaveLan/IEEE> at port 0x100-0x13f irq 3 function 0 config 1 on
: pccard0
: 
: Could that irq sharing be breaking something?  

It could also be that the pccard interrupt routing code (in
src/sys/dev/pccard/pccard.c) is busted.  If you look at it:

static void
pccard_intr(void *arg)
{
	struct pccard_softc *sc = (struct pccard_softc *) arg;
	struct pccard_function *pf;
	STAILQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
		if (pf->intr_handler != NULL) {
			int reg = pccard_ccr_read(pf, PCCARD_CCR_STATUS);
			if (reg & PCCARD_CCR_STATUS_INTR) {
				pccard_ccr_write(pf, PCCARD_CCR_STATUS,
				    reg & ~PCCARD_CCR_STATUS_INTR);
				pf->intr_handler(pf->intr_handler_arg);
			}
		}
	}
}

But if you look at the pccard stnadard, you'll find that the
PCCARD_CCR_STATUS_INTR bit is only defined for MFC cards.  So, try the
following:

static void
pccard_intr(void *arg)
{
	struct pccard_softc *sc = (struct pccard_softc *) arg;
	struct pccard_function *pf;
	STAILQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
		if (pf->intr_handler != NULL) {
			pf->intr_handler(pf->intr_handler_arg);
		}
	}
}

in its place.

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?200108030730.f737UfH62560>