Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/eisa Noralize autoconfiguration messages, and report...
details: https://anonhg.NetBSD.org/src/rev/846b4993a02b
branches: trunk
changeset: 1022541:846b4993a02b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Jul 24 19:06:25 2021 +0000
description:
Noralize autoconfiguration messages, and report interrupt trigger type.
diffstat:
sys/dev/eisa/mlx_eisa.c | 60 ++++++++++++++++++++++++++----------------------
1 files changed, 33 insertions(+), 27 deletions(-)
diffs (109 lines):
diff -r 241c4f6e001f -r 846b4993a02b sys/dev/eisa/mlx_eisa.c
--- a/sys/dev/eisa/mlx_eisa.c Sat Jul 24 18:50:07 2021 +0000
+++ b/sys/dev/eisa/mlx_eisa.c Sat Jul 24 19:06:25 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mlx_eisa.c,v 1.28 2021/04/24 23:36:53 thorpej Exp $ */
+/* $NetBSD: mlx_eisa.c,v 1.29 2021/07/24 19:06:25 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.28 2021/04/24 23:36:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.29 2021/07/24 19:06:25 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -113,16 +113,32 @@
struct mlx_softc *mlx;
bus_space_tag_t iot;
const char *intrstr;
- int irq, icfg;
+ int irq, ist, icfg;
char intrbuf[EISA_INTRSTR_LEN];
mlx = device_private(self);
iot = ea->ea_iot;
ec = ea->ea_ec;
+ dce = eisa_compatible_lookup(ea, compat_data);
+ KASSERT(dce != NULL);
+
+ mlx->mlx_ci.ci_nchan = (int)dce->value;
+ mlx->mlx_ci.ci_iftype = 1;
+
+ mlx->mlx_submit = mlx_v1_submit;
+ mlx->mlx_findcomplete = mlx_v1_findcomplete;
+ mlx->mlx_intaction = mlx_v1_intaction;
+ mlx->mlx_fw_handshake = mlx_v1_fw_handshake;
+#ifdef MLX_RESET
+ mlx->mlx_reset = mlx_v1_reset;
+#endif
+
+ aprint_normal(": Mylex RAID\n");
+
if (bus_space_map(iot, EISA_SLOT_ADDR(ea->ea_slot) +
MLX_EISA_SLOT_OFFSET, MLX_EISA_IOSIZE, 0, &ioh)) {
- aprint_error(": can't map i/o space\n");
+ aprint_error_dev(self, "can't map i/o space\n");
return;
}
@@ -150,42 +166,32 @@
irq = 15;
break;
default:
- aprint_error(": controller on invalid IRQ\n");
+ aprint_error_dev(self,
+ "controller on invalid IRQ (icfg=0x%02x)\n", icfg);
return;
}
+ ist = (icfg & 0x08) != 0 ? IST_LEVEL : IST_EDGE;
+
if (eisa_intr_map(ec, irq, &ih)) {
- aprint_error(": can't map interrupt (%d)\n", irq);
+ aprint_error_dev(self, "can't map interrupt (%d)\n", irq);
return;
}
intrstr = eisa_intr_string(ec, ih, intrbuf, sizeof(intrbuf));
- mlx->mlx_ih = eisa_intr_establish(ec, ih,
- ((icfg & 0x08) != 0 ? IST_LEVEL : IST_EDGE),
- IPL_BIO, mlx_intr, mlx);
+ mlx->mlx_ih = eisa_intr_establish(ec, ih, ist, IPL_BIO, mlx_intr, mlx);
if (mlx->mlx_ih == NULL) {
- aprint_error(": can't establish interrupt");
+ aprint_error_dev(self, "can't establish interrupt");
if (intrstr != NULL)
- aprint_normal(" at %s", intrstr);
- aprint_normal("\n");
+ aprint_error(" at %s", intrstr);
+ aprint_error("\n");
return;
}
+ if (intrstr != NULL) {
+ aprint_normal_dev(self, "interrupting at %s (%s trigger)\n",
+ ist == IST_EDGE ? "edge" : "level", intrstr);
+ }
- dce = eisa_compatible_lookup(ea, compat_data);
- KASSERT(dce != NULL);
-
- mlx->mlx_ci.ci_nchan = (int)dce->value;
- mlx->mlx_ci.ci_iftype = 1;
-
- mlx->mlx_submit = mlx_v1_submit;
- mlx->mlx_findcomplete = mlx_v1_findcomplete;
- mlx->mlx_intaction = mlx_v1_intaction;
- mlx->mlx_fw_handshake = mlx_v1_fw_handshake;
-#ifdef MLX_RESET
- mlx->mlx_reset = mlx_v1_reset;
-#endif
-
- aprint_normal(": Mylex RAID\n");
mlx_init(mlx, intrstr);
}
Home |
Main Index |
Thread Index |
Old Index