summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2019-11-16 21:53:38 +0000
committermlelstv <mlelstv@NetBSD.org>2019-11-16 21:53:38 +0000
commit4eaf257d1a0c280fa9aabc99ab0b2827ac84bcce (patch)
treecdc74c2930d9335b84d9fd9b34d6fc0fea954152 /sys/dev/fdt
parenta35913d311d685c5c12d6c9c1168f38b970746c7 (diff)
be more verbose about errors.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/fdt_intr.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/fdt/fdt_intr.c b/sys/dev/fdt/fdt_intr.c
index 1ad8a08bd1a..21ded128a29 100644
--- a/sys/dev/fdt/fdt_intr.c
+++ b/sys/dev/fdt/fdt_intr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_intr.c,v 1.22 2019/06/14 11:08:18 hkenken Exp $ */
+/* $NetBSD: fdt_intr.c,v 1.23 2019/11/16 21:53:38 mlelstv Exp $ */
/*-
* Copyright (c) 2015-2018 Jared McNeill <jmcneill@invisible.ca>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.22 2019/06/14 11:08:18 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.23 2019/11/16 21:53:38 mlelstv Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -138,8 +138,10 @@ fdtbus_intr_establish(int phandle, u_int index, int ipl, int flags,
int ihandle;
specifier = get_specifier_by_index(phandle, index, &ihandle);
- if (specifier == NULL)
+ if (specifier == NULL) {
+ printf("%s: handle not found %u@%x\n",__func__,index,phandle);
return NULL;
+ }
return fdtbus_intr_establish_raw(ihandle, specifier, ipl,
flags, func, arg);
@@ -168,8 +170,10 @@ fdtbus_intr_establish_raw(int ihandle, const u_int *specifier, int ipl,
void *ih;
ic = fdtbus_get_interrupt_controller(ihandle);
- if (ic == NULL)
+ if (ic == NULL) {
+ printf("%s: ihandle %d is not a controller\n",__func__,ihandle);
return NULL;
+ }
ih = ic->ic_funcs->establish(ic->ic_dev, __UNCONST(specifier),
ipl, flags, func, arg);