From owner-freebsd-arch@FreeBSD.ORG Tue Jun 17 03:54:29 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4167F37B401 for ; Tue, 17 Jun 2003 03:54:29 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D5A743FDD for ; Tue, 17 Jun 2003 03:54:28 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h5HAsQQ16910 for ; Tue, 17 Jun 2003 12:54:26 +0200 (MEST) Date: Tue, 17 Jun 2003 12:54:26 +0200 (CEST) From: Harti Brandt To: arch@freebsd.org Message-ID: <20030617124004.Y77677@beagle.fokus.fraunhofer.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: busdma sync problem X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2003 10:54:29 -0000 Hi, I have drivers for several cards that use shared host memory for communication between the card and the driver. In most cases these memory areas are used for queues: the driver writes on one end, the card reads on the other or the other way around. The problem is, that with the current bus_dma_sync call there is no way to correctly synchronize these queues, because bus_dma_sync synchonizes always the complete map. NetBSD bus_dma_sync has two additional parameters for that case: an offset and a length describing the part of the map to synchronize. Unless I got the above entirely wrong, I suppose we also need this functionality. The question is how to introduce it. The easy way is to implement a new function, say bus_dma_sync_size with the same signature as the NetBSD one. The formally more correct way would be to just change our function and all its callers. This would, of course, break the interface and I suppose it's too late for 5.X. So should I go the first way? Is there anybody who would be willing to look at the patch? harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org