Module Name: src Committed By: thorpej Date: Sun Mar 31 18:59:52 UTC 2024
Modified Files: src/sys/dev/pci: pciide_common.c Log Message: As the final step in configuraing bus-master DMA, consult the boolean device property "pciide-disable-dma" and disable bus-master DMA if that property is present and true. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/pciide_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/pciide_common.c diff -u src/sys/dev/pci/pciide_common.c:1.70 src/sys/dev/pci/pciide_common.c:1.71 --- src/sys/dev/pci/pciide_common.c:1.70 Mon Nov 20 21:59:38 2023 +++ src/sys/dev/pci/pciide_common.c Sun Mar 31 18:59:52 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_common.c,v 1.70 2023/11/20 21:59:38 thorpej Exp $ */ +/* $NetBSD: pciide_common.c,v 1.71 2024/03/31 18:59:52 thorpej Exp $ */ /* @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.70 2023/11/20 21:59:38 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.71 2024/03/31 18:59:52 thorpej Exp $"); #include <sys/param.h> @@ -484,6 +484,16 @@ pciide_mapreg_dma(struct pciide_softc *s aprint_verbose( ", but unused (forced off by config file)"); sc->sc_dma_ok = 0; + } else { + bool disable; + + if (prop_dictionary_get_bool( + device_properties(sc->sc_wdcdev.sc_atac.atac_dev), + "pciide-disable-dma", &disable) && disable) { + aprint_verbose( + ", but unused (disabled by platform)"); + sc->sc_dma_ok = 0; + } } break;