In message <[EMAIL PROTECTED]> 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()
<interrupt here> -> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message