Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2003 02:16:13 +0200
From:      Andrea Campi <andrea@webcom.it>
To:        Warner Losh <imp@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/pccbb pccbb.c pccbbvar.h
Message-ID:  <20030625001613.GA636@webcom.it>
In-Reply-To: <200306120337.h5C3bSmB075154@repoman.freebsd.org>
References:  <200306120337.h5C3bSmB075154@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030625001613.GA636>