From owner-cvs-all@FreeBSD.ORG Wed Sep 15 19:49:45 2004 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 8BC8316A4CE; Wed, 15 Sep 2004 19:49:45 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA99C43D2D; Wed, 15 Sep 2004 19:49:44 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i8FJmYAY063577; Wed, 15 Sep 2004 13:48:34 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 15 Sep 2004 13:49:18 -0600 (MDT) Message-Id: <20040915.134918.51856331.imp@bsdimp.com> To: green@freebsd.org From: "M. Warner Losh" In-Reply-To: <20040915152822.GD36708@green.homeunix.org> References: <200409151209.i8FC9p2t077569@repoman.freebsd.org> <20040915152822.GD36708@green.homeunix.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: phk@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/alpha/isa isa_dma.c src/sys/amd64/isa isa_dma.c src/sys/i386/isa isa_dma.c src/sys/ia64/isa isa_dma.c src/sys/pc98/pc98 isa_dma.c src/sys/isa isavar.h src/sys/vm vm_page.c 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, 15 Sep 2004 19:49:45 -0000 In message: <20040915152822.GD36708@green.homeunix.org> Brian Fundakowski Feldman writes: : On Wed, Sep 15, 2004 at 12:09:51PM +0000, Poul-Henning Kamp wrote: : > phk 2004-09-15 12:09:51 UTC : > : > FreeBSD src repository : > : > Modified files: : > sys/alpha/isa isa_dma.c : > sys/amd64/isa isa_dma.c : > sys/i386/isa isa_dma.c : > sys/ia64/isa isa_dma.c : > sys/pc98/pc98 isa_dma.c : > sys/isa isavar.h : > sys/vm vm_page.c : > Log: : > Add new a function isa_dma_init() which returns an errno when it fails : > and which takes a M_WAITOK/M_NOWAIT flag argument. : > : > Add compatibility isa_dmainit() macro which whines loudly if : > isa_dma_init() fails. : > : > Problem uncovered by: tegge : : David Yeske is running into a problem with it failing in fdc(4). I am not : sure how 40KB of memory is too big for it to allocate... but I think it : might be appropriate to try some sort of fallback. : : --- /usr/src/sys/dev/fdc/fdc.c Fri Aug 27 19:15:22 2004 : +++ tmp/fdc.c Tue Sep 7 21:44:26 2004 : @@ -1334,7 +1334,11 @@ : if (!(fdc->flags & FDC_NODMA) && fdc->dmacnt++ == 0) { : mtx_lock(&Giant); : isa_dma_acquire(fdc->dmachan); : - isa_dmainit(fdc->dmachan, MAX_BYTES_PER_CYL); : + if (isa_dmainit(fdc->dmachan, MAX_BYTES_PER_CYL) != 0) { : + isa_dma_release(fdc->dmachan); : + fdc->dmacnt--; : + fdc->flags |= FDC_NODMA; : + } : mtx_unlock(&Giant); : } : } I have patches, improved by Tor and phk, that move the acquisision of the dma buffer to attach. The problem is that 40k isn't too big, but 40k below 16MB is very hard after boon on large memory machines due to the amount of RAM allocated in the boot process. Warner