From owner-cvs-all Thu Jan 16 15:47:29 2003 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 4229437B40D for ; Thu, 16 Jan 2003 15:47:28 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id B86A443F18 for ; Thu, 16 Jan 2003 15:47:23 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 48121 invoked by uid 1000); 16 Jan 2003 23:47:24 -0000 Date: Thu, 16 Jan 2003 15:47:24 -0800 (PST) From: Nate Lawson To: Sam Leffler Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/firewire firewire.c fwdev.c fwohci.c fwohcivar.h In-Reply-To: <20e801c2bdad$770d56f0$5a557f42@errno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 16 Jan 2003, Sam Leffler wrote: > > >> Modified files: > > >> sys/dev/firewire firewire.c fwdev.c fwohci.c fwohcivar.h > > >> Log: > > >> Improve memory allocation. > > >> - Don't use contigmalloc() and allocate page by page to avoid > > >> allocation failure. > > >> - allocate buffer by PAGE_SIZE. > > > > > > Some comments. > > > > > >> - contigfree((void *)(uintptr_t)sc->fc.sid_buf, > > >> - OHCI_SIDSIZE, M_DEVBUF); > > >> + free((void *)(uintptr_t)sc->fc.sid_buf, M_DEVBUF); > > > > malloced buffers are not guaranteed to be accessable by a device. > > Use bus dma instead. > > New drivers should use bus_dma. I recently hit an issue like this with > jumbo mbufs not being handled by the bge driver because it doesn't use bus > dma. Valid points. I just wanted to clarify that many of his mallocs are not for buffers addressed by dma but also for control/header structures. Those do not need to be changed. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message