From owner-freebsd-hackers Fri Aug 25 05:07:16 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id FAA29553 for hackers-outgoing; Fri, 25 Aug 1995 05:07:16 -0700 Received: from fathergoose.net6c.io.org (fathergoose.net6c.io.org [204.92.6.86]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id FAA29547 for ; Fri, 25 Aug 1995 05:07:13 -0700 Received: (from kwong@localhost) by fathergoose.net6c.io.org (8.6.12/8.6.10) id DAA01286; Fri, 25 Aug 1995 03:34:30 -0400 From: Ken Wong Message-Id: <199508250734.DAA01286@fathergoose.net6c.io.org> Subject: Re: How to abort a DMA transfer ? To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Fri, 25 Aug 1995 03:34:29 -0400 (EDT) Cc: freebsd-hackers@FreeBSD.org In-Reply-To: <199508201701.TAA12803@labinfo.iet.unipi.it> from "Luigi Rizzo" at Aug 20, 95 07:01:00 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 676 Sender: hackers-owner@FreeBSD.org Precedence: bulk Luigi Rizzo Wrote: > > How (within a device driver) do I abort a DMA transfer which has > been started but has not completed yet ? I am having this problem > in the driver for a hand-scanner (the scanner does some read ahead; > meanwhile, a user might close the device and we want to abort the > transfer and free the buffer). I am surprised I haven't seen (or > understood!) anything like this in existing drivers, not even in > the floppy driver! To abort the DMA transfer: 1) reset the device that is using the DMA. being that scanner controller. 2) change some DMA registers for that channel. ( I don't have my book here today, but I can find out if needed). Ken