From owner-cvs-all@FreeBSD.ORG Tue Jun 24 17:16:19 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A0EA37B401; Tue, 24 Jun 2003 17:16:19 -0700 (PDT) Received: from brian.webcom.it (194-185-205-180.f5.ngi.it [194.185.205.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEDB043F75; Tue, 24 Jun 2003 17:16:16 -0700 (PDT) (envelope-from andrea@webcom.it) Received: by brian.webcom.it (Postfix, from userid 1000) id E3C2111; Wed, 25 Jun 2003 02:16:13 +0200 (CEST) Date: Wed, 25 Jun 2003 02:16:13 +0200 From: Andrea Campi To: Warner Losh Message-ID: <20030625001613.GA636@webcom.it> References: <200306120337.h5C3bSmB075154@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306120337.h5C3bSmB075154@repoman.freebsd.org> X-Echelon: BND CIA NSA Mossad KGB MI6 IRA detonator nuclear assault strike User-Agent: Mutt/1.5.4i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/pccbb pccbb.c pccbbvar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 00:16:19 -0000 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.