Use bus_dmatag_subregion to get a 32-bit tag
This commit is contained in:
parent
088c49a92b
commit
0514b24577
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xhci_acpi.c,v 1.4 2019/06/19 13:40:23 jmcneill Exp $ */
|
||||
/* $NetBSD: xhci_acpi.c,v 1.5 2019/06/22 19:35:40 jmcneill 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.4 2019/06/19 13:40:23 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xhci_acpi.c,v 1.5 2019/06/22 19:35:40 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
@ -130,10 +130,16 @@ xhci_acpi_attach(device_t parent, device_t self, void *aux)
|
||||
hccparams = bus_space_read_4(sc->sc_iot, sc->sc_ioh, XHCI_HCCPARAMS);
|
||||
if (XHCI_HCC_AC64(hccparams)) {
|
||||
aprint_verbose_dev(self, "using 64-bit DMA\n");
|
||||
sc->sc_bus.ub_dmatag = aa->aa_dmat64;
|
||||
sc->sc_bus.ub_dmatag = aa->aa_dmat;
|
||||
} else {
|
||||
aprint_verbose_dev(self, "using 32-bit DMA\n");
|
||||
sc->sc_bus.ub_dmatag = aa->aa_dmat;
|
||||
error = bus_dmatag_subregion(aa->aa_dmat, 0, 0xffffffff,
|
||||
&sc->sc_bus.ub_dmatag, BUS_DMA_WAITOK);
|
||||
if (error != 0) {
|
||||
aprint_error_dev(self, "couldn't create DMA tag: %d\n",
|
||||
error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ih = acpi_intr_establish(self, (uint64_t)aa->aa_node->ad_handle,
|
||||
|
Loading…
Reference in New Issue
Block a user