summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2013-07-06 14:28:49 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2013-07-06 14:28:49 +0000
commit2521e1262e2cbfb36369913880acf47247031812 (patch)
tree13d07261651a64d94ffa808e0dbedd57dc0d1127 /sys/arch
parent6d983eca391197cb1e744d7066dbd0463ebfbc7a (diff)
Print the number of targets and the irq before looking for subdevices,
like it was before r1.36, to correct the adb* lines in the dmesg.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/adb.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c
index 8f3b95a9542..b479e22f856 100644
--- a/sys/arch/macppc/dev/adb.c
+++ b/sys/arch/macppc/dev/adb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.c,v 1.37 2013/04/23 07:38:05 mpi Exp $ */
+/* $OpenBSD: adb.c,v 1.38 2013/07/06 14:28:48 mpi Exp $ */
/* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */
/* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */
@@ -1623,8 +1623,13 @@ adbattach(struct device *parent, struct device *self, void *aux)
}
adb_polling = 1;
- if (!adbempty)
+ if (!adbempty) {
adb_reinit();
+ totaladbs = count_adbs();
+ printf(": irq %d, %s, %d target%s", ca->ca_intr[0], ca->ca_name,
+ totaladbs, (totaladbs == 1) ? "" : "s");
+ }
+ printf("\n");
mac_intr_establish(parent, ca->ca_intr[0], IST_LEVEL, IPL_HIGH,
adb_intr, sc, sc->sc_dev.dv_xname);
@@ -1666,15 +1671,6 @@ adbattach(struct device *parent, struct device *self, void *aux)
if (adbempty)
return;
-#ifdef ADB_DEBUG
- if (adb_debug)
- printf("adb: done with adb_reinit\n");
-#endif
- totaladbs = count_adbs();
-
- printf(" irq %d: %s, %d target%s\n", ca->ca_intr[0], ca->ca_name,
- totaladbs, (totaladbs == 1) ? "" : "s");
-
/* for each ADB device */
for (adbindex = 1; adbindex <= totaladbs; adbindex++) {
/* Get the ADB information */