diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-04-27 19:20:22 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-04-27 19:20:22 +0000 |
commit | ee75455c01bf0810c0c194effa9f54f48491426f (patch) | |
tree | 28931d586caf3a8ae9af4871355e3234fc653ad6 /sys | |
parent | f3a5fc955e59a780b16a7eba5fca2a42a40ea858 (diff) |
The new probe logic would pretend light(4) devices always exist on Indigo;
fix this by reinstating the actual probe which got removed by mistake in the
recent gio probe and console code rework.
Found the hard way by sebastia@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sgi/gio/gio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arch/sgi/gio/gio.c b/sys/arch/sgi/gio/gio.c index b223234ebbc..f8a4d07614c 100644 --- a/sys/arch/sgi/gio/gio.c +++ b/sys/arch/sgi/gio/gio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gio.c,v 1.6 2012/04/24 20:11:26 miod Exp $ */ +/* $OpenBSD: gio.c,v 1.7 2012/04/27 19:20:21 miod Exp $ */ /* $NetBSD: gio.c,v 1.32 2011/07/01 18:53:46 dyoung Exp $ */ /* @@ -346,8 +346,14 @@ gio_id(vaddr_t va, paddr_t pa, int maybe_gfx) if (maybe_gfx == 0) return 0; else { - if (pa == LIGHT_ADDR_0 || pa == LIGHT_ADDR_1) - return GIO_PRODUCT_FAKEID_LIGHT; + if (pa == LIGHT_ADDR_0 || pa == LIGHT_ADDR_1) { + if (guarded_read_4(va + REX_PAGE1_SET + + REX_P1REG_XYOFFSET, &id32) != 0) + return 0; + if (id32 == 0x08000800) + return GIO_PRODUCT_FAKEID_LIGHT; + } + return 0; } } |