summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-03-30 15:31:07 +0000
committerad <ad@NetBSD.org>2008-03-30 15:31:07 +0000
commit36659bee7894a321c381fc32e7f3d4497dbdd9ed (patch)
treee2935c87081df21c64262384cd4ed11d323dc582 /sys/dev
parent73d8c4238eba63c799caf599d8f461a57d3fb725 (diff)
The isapnp probe is very slow, and there's not much we can do to speed it
up safely. Skip it if the system is known to have no ISA compatible expansion slots.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isapnp/isapnp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/isapnp/isapnp.c b/sys/dev/isapnp/isapnp.c
index 27abc063769..94b8af8c0f2 100644
--- a/sys/dev/isapnp/isapnp.c
+++ b/sys/dev/isapnp/isapnp.c
@@ -1,7 +1,7 @@
-/* $NetBSD: isapnp.c,v 1.56 2008/03/15 23:35:09 cube Exp $ */
+/* $NetBSD: isapnp.c,v 1.57 2008/03/30 15:31:07 ad Exp $ */
/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
+ * Copyright (c) 1996, 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.56 2008/03/15 23:35:09 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.57 2008/03/30 15:31:07 ad Exp $");
#include "isadma.h"
@@ -854,6 +854,13 @@ isapnp_match(device_t parent, cfdata_t match, void *aux)
struct isapnp_probe_cookie *ipc;
/*
+ * If the system has no ISA expansion slots, skip the probe
+ * because it's very slow.
+ */
+ if (isa_get_slotcount() == 0)
+ return (0);
+
+ /*
* Ensure we only probe ISA PnP once; we don't actually consume
* bus resources, so we have to prevent being cloned forever.
*/