summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-07-18 20:56:47 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-07-18 20:56:47 +0000
commit358bcb2e4ec1211883db83359cdb5d71898eddc7 (patch)
tree6dd960625ce771a41672f1da7d68d93f57385f16 /sys/arch
parentbc1d0d0436305d0b89cdf332bb55677c118e3600 (diff)
Attach non-frame buffer GIO devices with ga_product being the id gathered by
gio_id(), not the whole 32 bit first word. Some boards with a 8-bit only ID register use the other 24 bits, sadly.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/gio/gio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/sgi/gio/gio.c b/sys/arch/sgi/gio/gio.c
index c412ac61153..3a4a24fb257 100644
--- a/sys/arch/sgi/gio/gio.c
+++ b/sys/arch/sgi/gio/gio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gio.c,v 1.12 2012/07/18 20:12:08 miod Exp $ */
+/* $OpenBSD: gio.c,v 1.13 2012/07/18 20:56:46 miod Exp $ */
/* $NetBSD: gio.c,v 1.32 2011/07/01 18:53:46 dyoung Exp $ */
/*
@@ -312,12 +312,13 @@ gio_attach(struct device *parent, struct device *self, void *aux)
ga.ga_iot = sc->sc_iot;
ga.ga_ioh = PHYS_TO_XKPHYS(ga.ga_addr, CCA_NC);
- if (gio_id(ga.ga_ioh, ga.ga_addr, 0) == 0)
+ id = gio_id(ga.ga_ioh, ga.ga_addr, 0);
+ if (id == 0)
continue;
ga.ga_dmat = sc->sc_dmat;
ga.ga_slot = slot_bases[i].slot;
- ga.ga_product = bus_space_read_4(ga.ga_iot, ga.ga_ioh, 0);
+ ga.ga_product = id;
ga.ga_descr = NULL;
config_found_sm(self, &ga, gio_print, gio_submatch);