Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 1995 23:10:41 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to abort a DMA transfer ?
Message-ID:  <199508211340.XAA23788@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199508211228.OAA05314@uriah.heep.sax.de> from "J Wunsch" at Aug 21, 95 02:28:08 pm

next in thread | previous in thread | raw e-mail | index | archive | help
J Wunsch stands accused of saying:
> > 3) a new open is requested, possibly with different parameters, which
> >    causes the need for a larger buffer; now I need to abort the
> >    previous transfer, free the old memory, and malloc a newer block.
> 
> Does the scanner not set TC (terminal count, hardware signal) at the
> completion of its transfer?  It's the usual way how the transfer will
> be ended.  The DMAC will issue an interrupt on receipt of this signal.

If the scanner is using the old Omron mechanism, or a compatible, data is
only sent to the interface, and thus the DMAC, as the user moves the scanner
(clocked via an encoder driven off a roller).  If the user stops moving the
scanner before the intended number of lines have been read, there's
no way for anything on that side to know.  Either the driver can time out
and cancel the transfer, or it can wait 'till a new one is requested.

> If you really want to dig into this, get the van Dilluwe, at the very
> least.  You will find a detailed description of the DMAC and related
> hardware registers.

Personally, I'd try to run the card on interrupt (if it generates one) -
my general opinion of the PC's DMA implementation is not flattering 8)

> cheers, J"org

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and                                      [[
]] realtime instrument control          (ph/fax) +61-8-267-3039         [[
]] My car has "demand start" -Terry Lambert  UNIX: live FreeBSD or die! [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508211340.XAA23788>