Deleted Added
full compact
isa.c (33134) isa.c (35256)
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
37 * $Id: isa.c,v 1.110 1998/02/04 22:32:21 eivind Exp $
37 * $Id: isa.c,v 1.111 1998/02/06 12:13:17 eivind Exp $
38 */
39
40/*
41 * code to manage AT bus
42 *
43 * 92/08/18 Frank P. MacLachlan (fpm@crash.cts.com):
44 * Fixed uninitialized variable problem and added code to deal
45 * with DMA page boundaries in isa_dmarangecheck(). Fixed word

--- 601 unchanged lines hidden (view full) ---

647 if (buf == NULL)
648 printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize);
649 else
650 dma_bouncebuf[chan] = buf;
651}
652
653/*
654 * Register a DMA channel's usage. Usually called from a device driver
38 */
39
40/*
41 * code to manage AT bus
42 *
43 * 92/08/18 Frank P. MacLachlan (fpm@crash.cts.com):
44 * Fixed uninitialized variable problem and added code to deal
45 * with DMA page boundaries in isa_dmarangecheck(). Fixed word

--- 601 unchanged lines hidden (view full) ---

647 if (buf == NULL)
648 printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize);
649 else
650 dma_bouncebuf[chan] = buf;
651}
652
653/*
654 * Register a DMA channel's usage. Usually called from a device driver
655 * in open() or during it's initialization.
655 * in open() or during its initialization.
656 */
657int
658isa_dma_acquire(chan)
659 int chan;
660{
661#ifdef DIAGNOSTIC
662 if (chan & ~VALID_DMA_MASK)
663 panic("isa_dma_acquire: channel out of range");

--- 6 unchanged lines hidden (view full) ---

670 dma_inuse |= (1 << chan);
671 dma_auto_mode &= ~(1 << chan);
672
673 return (0);
674}
675
676/*
677 * Unregister a DMA channel's usage. Usually called from a device driver
656 */
657int
658isa_dma_acquire(chan)
659 int chan;
660{
661#ifdef DIAGNOSTIC
662 if (chan & ~VALID_DMA_MASK)
663 panic("isa_dma_acquire: channel out of range");

--- 6 unchanged lines hidden (view full) ---

670 dma_inuse |= (1 << chan);
671 dma_auto_mode &= ~(1 << chan);
672
673 return (0);
674}
675
676/*
677 * Unregister a DMA channel's usage. Usually called from a device driver
678 * during close() or during it's shutdown.
678 * during close() or during its shutdown.
679 */
680void
681isa_dma_release(chan)
682 int chan;
683{
684#ifdef DIAGNOSTIC
685 if (chan & ~VALID_DMA_MASK)
686 panic("isa_dma_release: channel out of range");

--- 382 unchanged lines hidden ---
679 */
680void
681isa_dma_release(chan)
682 int chan;
683{
684#ifdef DIAGNOSTIC
685 if (chan & ~VALID_DMA_MASK)
686 panic("isa_dma_release: channel out of range");

--- 382 unchanged lines hidden ---