summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-06-27 16:14:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-06-27 16:14:04 +0000
commit99f873339e74f405d16a3038302eb2d5bfbfc309 (patch)
tree039af1310e92e9f0f282869bec55833ca818cadc
parenta91ea02d7f51fa155a64a55969f62ac9b6b811c5 (diff)
Add an explicit widget locator to xbow children; allows a given widget to
be disabled with some UKC tinkering.
-rw-r--r--sys/arch/sgi/xbow/files.xbow4
-rw-r--r--sys/arch/sgi/xbow/xbow.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/sgi/xbow/files.xbow b/sys/arch/sgi/xbow/files.xbow
index 29289cd5daa..e2a875ae2b0 100644
--- a/sys/arch/sgi/xbow/files.xbow
+++ b/sys/arch/sgi/xbow/files.xbow
@@ -1,7 +1,7 @@
-# $OpenBSD: files.xbow,v 1.3 2009/05/08 23:08:35 miod Exp $
+# $OpenBSD: files.xbow,v 1.4 2009/06/27 16:14:03 miod Exp $
# IP30 and IP27 planar XBow bus
-define xbow {[vendor = -1], [product = -1]}
+define xbow {[widget = -1], [vendor = -1], [product = -1]}
device xbow
attach xbow at mainbus
file arch/sgi/xbow/xbow.c xbow
diff --git a/sys/arch/sgi/xbow/xbow.c b/sys/arch/sgi/xbow/xbow.c
index 43be3991622..902448eb2ff 100644
--- a/sys/arch/sgi/xbow/xbow.c
+++ b/sys/arch/sgi/xbow/xbow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbow.c,v 1.10 2009/06/17 18:20:24 miod Exp $ */
+/* $OpenBSD: xbow.c,v 1.11 2009/06/27 16:14:03 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -245,9 +245,11 @@ xbowsubmatch(struct device *parent, void *vcf, void *aux)
struct xbow_attach_args *xaa = aux;
struct cfdata *cf = vcf;
- if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != xaa->xaa_vendor)
+ if (cf->cf_loc[0] != -1 && cf->cf_loc[0] != xaa->xaa_widget)
return 0;
- if (cf->cf_loc[1] != -1 && cf->cf_loc[1] != xaa->xaa_product)
+ if (cf->cf_loc[1] != -1 && cf->cf_loc[1] != xaa->xaa_vendor)
+ return 0;
+ if (cf->cf_loc[2] != -1 && cf->cf_loc[2] != xaa->xaa_product)
return 0;
return (*cf->cf_attach->ca_match)(parent, vcf, aux);