Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Test the 64bit dma tag with BUS_DMA_TAG_VALID b...
details: https://anonhg.NetBSD.org/src/rev/49e24b6ae96c
branches: trunk
changeset: 945233:49e24b6ae96c
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Oct 24 08:57:06 2020 +0000
description:
Test the 64bit dma tag with BUS_DMA_TAG_VALID before using it.
diffstat:
sys/dev/acpi/vmbus_acpi.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 8c8f48cc0830 -r 49e24b6ae96c sys/dev/acpi/vmbus_acpi.c
--- a/sys/dev/acpi/vmbus_acpi.c Sat Oct 24 08:56:27 2020 +0000
+++ b/sys/dev/acpi/vmbus_acpi.c Sat Oct 24 08:57:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmbus_acpi.c,v 1.2 2019/05/24 14:28:48 nonaka Exp $ */
+/* $NetBSD: vmbus_acpi.c,v 1.3 2020/10/24 08:57:06 skrll Exp $ */
/*
* Copyright (c) 2018 Kimihiro Nonaka <nonaka%NetBSD.org@localhost>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vmbus_acpi.c,v 1.2 2019/05/24 14:28:48 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmbus_acpi.c,v 1.3 2020/10/24 08:57:06 skrll Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -84,7 +84,8 @@
sc->sc.sc_dev = self;
sc->sc.sc_iot = aa->aa_iot;
sc->sc.sc_memt = aa->aa_memt;
- sc->sc.sc_dmat = aa->aa_dmat64 ? aa->aa_dmat64 : aa->aa_dmat;
+ sc->sc.sc_dmat = BUS_DMA_TAG_VALID(aa->aa_dmat64) ?
+ aa->aa_dmat64 : aa->aa_dmat;
if (vmbus_attach(&sc->sc))
return;
Home |
Main Index |
Thread Index |
Old Index