Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Fix build when NATA_DMA is 0.



details:   https://anonhg.NetBSD.org/src/rev/78483009560d
branches:  trunk
changeset: 758843:78483009560d
user:      dholland <dholland%NetBSD.org@localhost>
date:      Wed Nov 17 19:36:54 2010 +0000

description:
Fix build when NATA_DMA is 0.

diffstat:

 sys/dev/pci/pciide_common.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 06ccc3e0dc04 -r 78483009560d sys/dev/pci/pciide_common.c
--- a/sys/dev/pci/pciide_common.c       Wed Nov 17 18:22:17 2010 +0000
+++ b/sys/dev/pci/pciide_common.c       Wed Nov 17 19:36:54 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide_common.c,v 1.47 2010/11/13 13:52:08 uebayasi Exp $      */
+/*     $NetBSD: pciide_common.c,v 1.48 2010/11/17 19:36:54 dholland Exp $      */
 
 
 /*
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.47 2010/11/13 13:52:08 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.48 2010/11/17 19:36:54 dholland Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -205,17 +205,21 @@
                }
 
                for (drive = 0; drive < cp->ata_channel.ch_ndrive; drive++) {
+#if NATA_DMA
                        pciide_dma_table_teardown(sc, channel, drive);
+#endif
                }
 
                free(cp->ata_channel.ch_queue, M_DEVBUF);
                cp->ata_channel.atabus = NULL;
        }
 
+#if NATA_DMA
        if (sc->sc_dma_ios != 0)
                bus_space_unmap(sc->sc_dma_iot, sc->sc_dma_ioh, sc->sc_dma_ios);
        if (sc->sc_ba5_ss != 0)
                bus_space_unmap(sc->sc_ba5_st, sc->sc_ba5_sh, sc->sc_ba5_ss);
+#endif
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index