summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-10-11 19:36:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-10-11 19:36:26 +0000
commitd4eb19e3b9ef5fbfe2fc298b60acdb8043a76524 (patch)
tree9813926413d8156cbf577dd3ff8a2750ced1c0e0
parent58deb9fca3eaf05c87e9ed86f93d4b855ff6cc59 (diff)
Make sure com@io[cf] attachment stanzas with locators win over generic com*
lines. (This is done only to make dmesg look nice)
-rw-r--r--sys/arch/sgi/dev/com_ioc.c7
-rw-r--r--sys/arch/sgi/dev/com_iof.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/sgi/dev/com_ioc.c b/sys/arch/sgi/dev/com_ioc.c
index 8f69a8c6573..a666ce6b17c 100644
--- a/sys/arch/sgi/dev/com_ioc.c
+++ b/sys/arch/sgi/dev/com_ioc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_ioc.c,v 1.5 2009/07/26 19:58:49 miod Exp $ */
+/* $OpenBSD: com_ioc.c,v 1.6 2009/10/11 19:36:25 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -54,6 +54,7 @@ extern struct cfdriver com_cd;
int
com_ioc_probe(struct device *parent, void *match, void *aux)
{
+ struct cfdata *cf = match;
struct ioc_attach_args *iaa = aux;
bus_space_tag_t iot = iaa->iaa_memt;
bus_space_handle_t ioh;
@@ -73,6 +74,10 @@ com_ioc_probe(struct device *parent, void *match, void *aux)
} else
rv = 1;
+ /* make a config stanza with exact locators match over a generic line */
+ if (cf->cf_loc[0] != -1)
+ rv += rv;
+
return rv;
}
diff --git a/sys/arch/sgi/dev/com_iof.c b/sys/arch/sgi/dev/com_iof.c
index 73dc9638400..4a0190ffe23 100644
--- a/sys/arch/sgi/dev/com_iof.c
+++ b/sys/arch/sgi/dev/com_iof.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_iof.c,v 1.2 2009/10/07 04:17:46 miod Exp $ */
+/* $OpenBSD: com_iof.c,v 1.3 2009/10/11 19:36:25 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -52,6 +52,7 @@ extern struct cfdriver com_cd;
int
com_iof_probe(struct device *parent, void *match, void *aux)
{
+ struct cfdata *cf = match;
struct iof_attach_args *iaa = aux;
bus_space_tag_t iot = iaa->iaa_memt;
bus_space_handle_t ioh;
@@ -71,6 +72,10 @@ com_iof_probe(struct device *parent, void *match, void *aux)
} else
rv = 1;
+ /* make a config stanza with exact locators match over a generic line */
+ if (cf->cf_loc[0] != -1)
+ rv += rv;
+
return rv;
}