From owner-freebsd-hackers Fri Aug 3 1:23:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from security.za.net (security.za.net [196.2.146.22]) by hub.freebsd.org (Postfix) with ESMTP id A254237B405 for ; Fri, 3 Aug 2001 01:23:31 -0700 (PDT) (envelope-from lists@security.za.net) Received: from localhost (lists@localhost) by security.za.net (8.11.4/8.11.4) with ESMTP id f738NLR43378; Fri, 3 Aug 2001 10:23:21 +0200 (SAST) (envelope-from lists@security.za.net) Date: Fri, 3 Aug 2001 10:23:21 +0200 (SAST) From: lists To: Warner Losh Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: NewCard / pccbb In-Reply-To: <200108030730.f737UfH62560@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tried the patch, interesting thing, for some reason or other its always routing the IRQ to the same IRQ as the realtek network card I have in here, and with the patch in (before nothing worked at all on the pccbb), now if the network card is in slot0 it doesnt work, and the wavelan does, if the wavelan comes first on the pcibus it doesnt work and the network card does. For some reason it always seems to be trying to share an IRQ between these 2, any reason for this? Andrew On Fri, 3 Aug 2001, Warner Losh wrote: > : wi0: 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message