Module Name: src
Committed By: riastradh
Date: Thu Nov 5 20:26:10 UTC 2015
Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device:
nouveau_engine_device_base.c
Log Message:
Fix bogus output parameter for bus_space_map.
We stored the bus space handle in nv_subdev(device)->mmioh, which we
then overwrote with whatever was in the mmioh local variable -- maybe
garbage, maybe an old mapping, almost certainly wrong either way.
Instead store it in mmioh so that the subsequent assignment
nv_subdev(device)->mmioh = mmioh actually works as intended.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.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/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c:1.5 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c:1.6
--- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c:1.5 Sat Oct 17 21:13:38 2015
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c Thu Nov 5 20:26:10 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_device_base.c,v 1.5 2015/10/17 21:13:38 jmcneill Exp $ */
+/* $NetBSD: nouveau_engine_device_base.c,v 1.6 2015/11/05 20:26:10 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.5 2015/10/17 21:13:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.6 2015/11/05 20:26:10 riastradh Exp $");
#include <core/object.h>
#include <core/device.h>
@@ -293,8 +293,8 @@ nouveau_devobj_ctor(struct nouveau_objec
#ifdef __NetBSD__
if (!(args->disable & NV_DEVICE_DISABLE_MMIO) &&
!nv_subdev(device)->mmiosz) {
- if (bus_space_map(mmiot, mmio_base, mmio_size, 0,
- &nv_subdev(device)->mmioh) != 0) {
+ if (bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh)
+ != 0) {
nv_error(device, "unable to map device registers\n");
return -ENOMEM;
}