From owner-freebsd-current@FreeBSD.ORG Mon Jan 5 10:34:47 2004 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 2EAD816A4CE; Mon, 5 Jan 2004 10:34:47 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05A7743D2D; Mon, 5 Jan 2004 10:34:46 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id F35F05C7FA; Mon, 5 Jan 2004 10:34:45 -0800 (PST) Date: Mon, 5 Jan 2004 19:34:45 +0100 From: Maxime Henrion To: Don Lewis Message-ID: <20040105183445.GK2060@elvis.mu.org> References: <200401041115.29188.dejan.lesjak@ijs.si> <200401042151.i04Lp27E009737@gw.catspoiler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401042151.i04Lp27E009737@gw.catspoiler.org> User-Agent: Mutt/1.4.1i cc: current@FreeBSD.org Subject: Re: 5.2-RC oerrs and collisions on dc0 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: Mon, 05 Jan 2004 18:34:47 -0000 Don Lewis wrote: > I just took a closer look at the busdma diff, and this change to > dc_txeof() looks very suspicious: > > @@ -2663,7 +2809,7 @@ > if (txstat & DC_TXSTAT_OWN) > break; > > - if (!(cur_tx->dc_ctl & DC_TXCTL_LASTFRAG) || > + if (!(cur_tx->dc_ctl & DC_TXCTL_FIRSTFRAG) || > cur_tx->dc_ctl & DC_TXCTL_SETUP) { > if (cur_tx->dc_ctl & DC_TXCTL_SETUP) { > /* > > The code in the "if" block ends with a "continue" which will cause the > error handling code to be skipped if the "if" condition is true. I'm > pretty sure that the error status bits are only set in the last > descriptor for the frame, so we want to execute the "continue" unless > the DC_TXCTL_LASTFRAG bit is set. > > Try reverting this part of the busdma change. I think you actually found the culprit, though fixing this is not as simple as reverting this line. I changed the check to DC_TXCTL_FIRSTFRAG because that's the descriptor which will have a link to the mbuf, while it was previously done for the LASTFRAG descriptor. However, I didn't think about the code flow enough it seems. If you don't have a fix for this soon, I should be able to do it pretty easily, assuming I find the time. Thanks, Maxime