From owner-freebsd-alpha Tue Jul 18 0: 7:23 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id CA55437BC79; Tue, 18 Jul 2000 00:07:19 -0700 (PDT) (envelope-from dg@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id XAA27563; Mon, 17 Jul 2000 23:53:36 -0700 (PDT) Message-Id: <200007180653.XAA27563@implode.root.com> To: Andrew Gallatin Cc: Bernd Walter , mjacob@feral.com, Mike Smith , freebsd-alpha@FreeBSD.ORG Subject: Re: fxp0 hangs on a PC164 using STABLE In-reply-to: Your message of "Mon, 17 Jul 2000 22:37:19 EDT." <14707.48450.371071.494543@grasshopper.cs.duke.edu> From: David Greenman Reply-To: dg@root.com Date: Mon, 17 Jul 2000 23:53:36 -0700 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >The problem is that the status & command field share a 32-bit word. >The programming API of the eepro apparently requires that you update >the status field of a transmit slot that you've given to the card. >Since alphas can only operate on 32-bit chunks of memory, both the >status & command fields are loaded into memory & operated on in >registers when the following line of C is executed: > > /* > * Advance the end of list forward. > */ > sc->cbl_last->cb_command &= ~FXP_CB_COMMAND_S; > >The race is caused by the card DMA'ing up the status at just the wrong >time -- after it has been loaded into a register & before it has been >written back. The old value of the status is written back, clobbering >the status the card just DMA'ed up. The fact that the card has sent >this frame is missed & the transmit engine appears to hang. I wonder - does the Alpha CPU have support for locked read-modify-write type operations? I'm thinking that perhaps that might be a better way to fix the problem. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org Manufacturer of high-performance Internet servers - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message