From owner-freebsd-net Tue Aug 21 10:45:32 2001 Delivered-To: freebsd-net@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 9348C37B409; Tue, 21 Aug 2001 10:45:18 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f7LHjDq39709; Tue, 21 Aug 2001 11:45:13 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f7LHjCW66969; Tue, 21 Aug 2001 11:45:13 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200108211745.f7LHjCW66969@harmony.village.org> To: David Malone Subject: Re: 4.4-RC NFS panic Cc: walter@pelissero.org, John Baldwin , net@FreeBSD.ORG, hackers@FreeBSD.ORG, Andre Albsmeier In-reply-to: Your message of "Tue, 21 Aug 2001 09:35:34 BST." <200108210935.aa87782@salmon.maths.tcd.ie> References: <200108210935.aa87782@salmon.maths.tcd.ie> Date: Tue, 21 Aug 2001 11:45:12 -0600 From: Warner Losh Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <200108210935.aa87782@salmon.maths.tcd.ie> David Malone writes: : Andre Albsmeier, who's seeing various network problems, is using : the xe driver (also PCMCIA I think), but the problems go away if : he uses an Etherexpress card on the PCI bus of the same machine. : : It seems unlikely to be PCMCIA related ('cos it has nothing to do : with the networking itself) it may just be triggered in machines : with slower networking. After talking with Ian Dowse, I think that we've hammered out what may cause this. Basically, the problem is code in net doing splnet() -> pcic_pci_intr -> netcard_intr -> network code. And we've interrupted the critical section, broken all kinds of invariants. Warner P.S. I think that with Ian's other interrupt changes, we can do the following w/o problems. This should fix the network problems, I think. Index: pcic_pci.c =================================================================== RCS file: /cache/ncvs/src/sys/pccard/pcic_pci.c,v retrieving revision 1.54.2.7 diff -u -r1.54.2.7 pcic_pci.c --- pcic_pci.c 2001/08/21 09:06:25 1.54.2.7 +++ pcic_pci.c 2001/08/21 17:18:06 @@ -515,15 +515,6 @@ * in the CD change. */ sp->getb(sp, PCIC_STAT_CHG); - - /* - * If we have a card in the slot with an interrupt handler, then - * call it. Note: This means that each card can have at most one - * interrupt handler for it. Since multifunction cards aren't - * supported, this shouldn't cause a problem in practice. - */ - if (sc->cd_present && sp->intr != NULL) - sp->intr(sp->argp); } /* @@ -784,36 +775,6 @@ return (0); } -static int -pcic_pci_setup_intr(device_t dev, device_t child, struct resource *irq, - int flags, driver_intr_t *intr, void *arg, void **cookiep) -{ - struct pcic_softc *sc = (struct pcic_softc *) device_get_softc(dev); - struct pcic_slot *sp = &sc->slots[0]; - - if (sp->intr) { - device_printf(dev, -"Interrupt already established, possible multiple attach bug.\n"); - return (EINVAL); - } - sp->intr = intr; - sp->argp = arg; - *cookiep = sc; - return (0); -} - -static int -pcic_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, - void *cookie) -{ - struct pcic_softc *sc = (struct pcic_softc *) device_get_softc(dev); - struct pcic_slot *sp = &sc->slots[0]; - - sp->intr = NULL; - sp->argp = NULL; - return (0); -} - static device_method_t pcic_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pcic_pci_probe), @@ -829,8 +790,8 @@ DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, pcic_activate_resource), DEVMETHOD(bus_deactivate_resource, pcic_deactivate_resource), - DEVMETHOD(bus_setup_intr, pcic_pci_setup_intr), - DEVMETHOD(bus_teardown_intr, pcic_pci_teardown_intr), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* Card interface */ DEVMETHOD(card_set_res_flags, pcic_set_res_flags), To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message