Module Name: src
Committed By: skrll
Date: Sat Oct 24 08:55:23 UTC 2020
Modified Files:
src/sys/dev/acpi: xhci_acpi.c
Log Message:
Fix DMA size reporting. Previously it could report 64bit DMA when the tag
wasn't available (and it fell back to 32bit tag)
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/xhci_acpi.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/acpi/xhci_acpi.c
diff -u src/sys/dev/acpi/xhci_acpi.c:1.7 src/sys/dev/acpi/xhci_acpi.c:1.8
--- src/sys/dev/acpi/xhci_acpi.c:1.7 Fri Jan 31 23:12:13 2020
+++ src/sys/dev/acpi/xhci_acpi.c Sat Oct 24 08:55:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci_acpi.c,v 1.7 2020/01/31 23:12:13 jmcneill Exp $ */
+/* $NetBSD: xhci_acpi.c,v 1.8 2020/10/24 08:55:23 skrll Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.7 2020/01/31 23:12:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.8 2020/10/24 08:55:23 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -129,10 +129,9 @@ xhci_acpi_attach(device_t parent, device
}
hccparams = bus_space_read_4(sc->sc_iot, sc->sc_ioh, XHCI_HCCPARAMS);
- if (XHCI_HCC_AC64(hccparams)) {
+ if (XHCI_HCC_AC64(hccparams) && BUS_DMA_TAG_VALID(aa->aa_dmat64)) {
aprint_verbose_dev(self, "using 64-bit DMA\n");
- sc->sc_bus.ub_dmatag = BUS_DMA_TAG_VALID(aa->aa_dmat64) ?
- aa->aa_dmat64 : aa->aa_dmat;
+ sc->sc_bus.ub_dmatag = aa->aa_dmat64;
} else {
aprint_verbose_dev(self, "using 32-bit DMA\n");
sc->sc_bus.ub_dmatag = aa->aa_dmat;