From owner-freebsd-hackers Mon Aug 21 09:17:43 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id JAA27911 for hackers-outgoing; Mon, 21 Aug 1995 09:17:43 -0700 Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id JAA27905 for ; Mon, 21 Aug 1995 09:17:38 -0700 Received: (from julian@localhost) by ref.tfs.com (8.6.11/8.6.9) id JAA23757; Mon, 21 Aug 1995 09:15:39 -0700 From: Julian Elischer Message-Id: <199508211615.JAA23757@ref.tfs.com> Subject: Re: How to abort a DMA transfer ? To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Mon, 21 Aug 1995 09:15:39 -0700 (PDT) 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] Content-Type: text Content-Length: 1243 Sender: hackers-owner@freebsd.org Precedence: bulk > > 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! most drivers assume that if a DMA starts it will complete.. in fact I know of no mechanism to stop a DMA from completing even if the devices and memory doesn't respond, the DMA will complete, because of the marvelous PC way that DMA is implimented, if something fails to respond with a WAIT-STATE, it's assumed to have completed. So a frozen device is the QUICKEST to respond :( > > Thanks > Luigi > ==================================================================== > Luigi Rizzo Dip. di Ingegneria dell'Informazione > email: luigi@iet.unipi.it Universita' di Pisa > tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) > fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ > ==================================================================== >