From owner-cvs-src@FreeBSD.ORG Thu Jun 26 11:21:46 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC3B337B401; Thu, 26 Jun 2003 11:21:45 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 816F743FE3; Thu, 26 Jun 2003 11:21:45 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 652402ED43C; Thu, 26 Jun 2003 11:21:45 -0700 (PDT) Date: Thu, 26 Jun 2003 20:21:45 +0200 From: Maxime Henrion To: Nate Lawson Message-ID: <20030626182145.GA21011@elvis.mu.org> References: <20030626132750.0BEB537B490@hub.freebsd.org> <20030626101347.F74937@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030626101347.F74937@root.org> User-Agent: Mutt/1.4.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/ep if_ep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 18:21:46 -0000 Nate Lawson wrote: > On Thu, 26 Jun 2003, Maxime Henrion wrote: > > 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 > > > > Revision Changes Path > > 1.115 +5 -7 src/sys/dev/ep/if_ep.c > > Nice debugging! (bus(9) for this driver coming soon? :) If someone does it, yes :-). I don't even have ep(4) hardware here and not enough free time to do so. Maxime