From owner-cvs-src@FreeBSD.ORG Mon Apr 14 06:04:31 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 29E0537B401; Mon, 14 Apr 2003 06:04:31 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BA7643F3F; Mon, 14 Apr 2003 06:04:30 -0700 (PDT) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.8/8.12.8) with ESMTP id h3ED5YxS010881; Mon, 14 Apr 2003 09:05:34 -0400 (EDT) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.8/8.12.8/Submit) id h3ED5ThY010880; Mon, 14 Apr 2003 09:05:29 -0400 (EDT) Date: Mon, 14 Apr 2003 09:05:29 -0400 From: Jake Burkholder To: Hidetoshi Shimokawa Message-ID: <20030414130528.GD97094@locore.ca> References: <200304140419.h3E4Jgwi070671@repoman.freebsd.org> <20030414073329.GC97094@locore.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i cc: Hidetoshi Shimokawa cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 busdma_machdep.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: Mon, 14 Apr 2003 13:04:31 -0000 Apparently, On Mon, Apr 14, 2003 at 05:54:58PM +0900, Hidetoshi Shimokawa said words to the effect of; > At Mon, 14 Apr 2003 03:33:29 -0400, > Jake Burkholder wrote: > > > > Apparently, On Sun, Apr 13, 2003 at 09:19:42PM -0700, > > Hidetoshi Shimokawa said words to the effect of; > > > > > simokawa 2003/04/13 21:19:42 PDT > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/i386/i386 busdma_machdep.c > > > Log: > > > * Use _bus_dmamap_load_buffer() and respect maxsegsz in bus_dmamap_load(). > > > Ignoring maxsegsz may lead to fatal data corruption for some devices. > > > ex. SBP-2/FireWire > > > > Hmm. _bus_dmamap_load_buffer doesn't handle delayed loads due to lack > > of resources like bus_dmamap_load does (did). I think you will need to > > respect BUS_DMA_WAITOK/BUS_DMA_NOWAIT in the flags argument to > > _bus_dmamap_load_buffer, and pass BUS_DMA_WAITOK in bus_dmamap_load and > > BUS_DMA_NOWAIT in other cases. If _bus_dmamap_load_buffer runs out of > > resources it should return EINPROGRESS and queue the request if > > BUS_DMA_WAITOK is specified, or return ENOMEM if BUS_DMA_NOWAIT is specified. > > You are right. How about this patch? [ snip ] Yes, looks good to me, thanks. Jake