From owner-freebsd-current@FreeBSD.ORG Fri Jul 4 06:04:50 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27E3237B401 for ; Fri, 4 Jul 2003 06:04:50 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E3A943FEA for ; Fri, 4 Jul 2003 06:04:48 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h64D4fdP003012; Fri, 4 Jul 2003 07:04:44 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 04 Jul 2003 22:04:34 +0900 (JST) Message-Id: <20030704.220434.61850465.imp@bsdimp.com> To: mark@grondar.org From: "M. Warner Losh" In-Reply-To: <200307041246.h64Cku8E042346@grimreaper.grondar.org> References: <20030704.213258.29330692.imp@bsdimp.com> <200307041246.h64Cku8E042346@grimreaper.grondar.org> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: 3COM ep0 pccard device broken in current. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2003 13:04:50 -0000 In message: <200307041246.h64Cku8E042346@grimreaper.grondar.org> Mark Murray writes: : "M. Warner Losh" writes: : > Have you gotten all of the recent changes to current wrt ep0? It was : > broken by my making cbbintr mpsafe. Well, it was broken a long time : > ago, my change just opened a race that used to be won, but now is : > lost. : : Yup. I believe so, but please confirm where the change was to be sure? There were two changes. One is in pccbb.c that makes things a MPSAFE interrupt. You could revert to version 1.175 of pccbb.c. For ep.c, you need the following or newer Revision 1.115 / (download) - annotate - [select for diffs], Thu Jun 26 13:27:44 2003 UTC (7 days, 23 hours ago) by mux Changes since 1.114: +5 -7 lines Fix a race condition that was introduced since pccbb interrupts are flag'ed INTR_MPSAFE. In ep_if_start(), use the IF_DEQUEUE macro to grab the next mbuf to send, and use IF_PREPEND if the card is busy and we actually can't handle it right now. The old code was first getting the mbuf by taking it from the queue without using the macros, thus without locking, and without removing it from the queue either. It was later assuming that IF_DEQUEUE would give him this same mbuf. Tested by: mich