cvs commit: src/sys/dev/pccbb pccbb.c pccbbvar.h
Andrea Campi
andrea at webcom.it
Tue Jun 24 17:16:20 PDT 2003
On Wed, Jun 11, 2003 at 08:37:28PM -0700, Warner Losh wrote:
> imp 2003/06/11 20:37:28 PDT
>
> FreeBSD src repository
>
> Modified files:
> sys/dev/pccbb pccbb.c pccbbvar.h
> Log:
> Make cbb interrupts MPSAFE:
> o Register ISR INTR_MPSAFE.
...
> Revision Changes Path
> 1.76 +31 -20 src/sys/dev/pccbb/pccbb.c
> 1.19 +3 -2 src/sys/dev/pccbb/pccbbvar.h
This commit causes my ep0 to stop working after some traffic is exchanged;
the symptoms are full buffers (e.g. dhclient: send_packet: No buffer space available)
I traced the issue to this commit by dichotomic search; I also verified reverting to
1.78 and applying this patch is enough to get it to work again (I'm not actually sure
all three hunks are needed).
Could you look into this issue?
Bye,
Andrea
--- pccbb.c Thu Jun 12 05:37:28 2003
+++ pccbb.c.fixed Wed Jun 25 02:05:28 2003
@@ -730,8 +730,8 @@
goto err;
}
- if (bus_setup_intr(brdev, sc->irq_res, INTR_TYPE_AV | INTR_MPSAFE,
- cbb_intr, sc, &sc->intrhand)) {
+ if (bus_setup_intr(brdev, sc->irq_res, INTR_TYPE_AV, cbb_intr, sc,
+ &sc->intrhand)) {
device_printf(brdev, "couldn't establish interrupt");
goto err;
}
@@ -866,7 +866,6 @@
*cookiep = ih;
ih->intr = intr;
ih->arg = arg;
- ih->flags = flags & INTR_MPSAFE;
STAILQ_INSERT_TAIL(&sc->intr_handlers, ih, entries);
/*
* XXX need to turn on ISA interrupts, if we ever support them, but
@@ -1087,11 +1086,7 @@
}
if (sc->flags & CBB_CARD_OK) {
STAILQ_FOREACH(ih, &sc->intr_handlers, entries) {
- if ((ih->flags & INTR_MPSAFE) != 0)
- mtx_lock(&Giant);
(*ih->intr)(ih->arg);
- if ((ih->flags & INTR_MPSAFE) != 0)
- mtx_lock(&Giant);
}
}
}
--
It is easier to fix Unix than to live with NT.
More information about the cvs-src
mailing list