From owner-freebsd-multimedia@FreeBSD.ORG Mon Feb 23 20:58:20 2004 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF8DF16A4CE for ; Mon, 23 Feb 2004 20:58:20 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.5]) by mx1.FreeBSD.org (Postfix) with SMTP id A57B943D1D for ; Mon, 23 Feb 2004 20:58:20 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 75955 invoked by uid 1002); 24 Feb 2004 04:58:18 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 24 Feb 2004 04:58:18 -0000 Message-ID: <403AD939.3070504@freebsd.org> Date: Mon, 23 Feb 2004 21:55:21 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Wehle References: <200401311901.i0VJ15028053@jwlab.FEITH.COM> In-Reply-To: <200401311901.i0VJ15028053@jwlab.FEITH.COM> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: emoe@cox.net cc: multimedia@freebsd.org Subject: Re: FreeBSD 4.9 / 5.2 Hauppauge PVR-250 / 350 Driver Patch (Jan 31, 2004) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2004 04:58:21 -0000 John Wehle wrote: > [ This is the Jan 31, 2004 snapshot of my source tree. Included are > changes to support FreeBSD 5.2 in addition to a fix for the crash > which happens when unloading the module on some systems. The FreeBSD > 5.2 support was made possible by Erik Moe who did > the initial port and supplied access to his machine so I could > integrate the changes. ] > Very nice driver. I'm not terribly familiar with the hardware, but I wanted to make a comment on the busdma usage. When you are allocating a buffer with bus_dmamem_alloc(), you don't need to check the return value of bus_dmamap_load() since it is guaranteed to succeed and not be deferred in that case. Also, the dma tag for these buffers should be created with NULL, NULL for the lock arguments. Also, you might be able to save the overhead of uiomove() by using bus_dmamap_load_uio() to operate directly on the uio buffers rather than pre-allocting static buffers. This would only work if the hardware can do multiple S/G elements, so it might not work in this case, don't know. Anyways, very nice driver. Scott