On Mon, 31 Jan 2000, Nikolai Saoukh wrote:
> THE PROBLEM is that tok_isa_probe is not called at all,
> when driver kldloaded. Return value is irrelevant for this case.

Try the attached patch.

(cd /sys/isa && patch < isa_common.c.patch)

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
| http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |
Index: isa_common.c
===================================================================
RCS file: /cvs/src/sys/isa/isa_common.c,v
retrieving revision 1.15
diff -u -r1.15 isa_common.c
--- isa_common.c        2000/01/18 02:15:05     1.15
+++ isa_common.c        2000/01/31 20:42:03
@@ -783,8 +783,7 @@
 static void
 isa_driver_added(device_t dev, driver_t *driver)
 {
-       device_t *children;
-       int nchildren, i;
+       device_t child;
 
        /*
         * Don't do anything if drivers are dynamically
@@ -796,11 +795,10 @@
                return;
 
        DEVICE_IDENTIFY(driver, dev);
-       if (device_get_children(dev, &children, &nchildren))
-               return;
 
-       for (i = 0; i < nchildren; i++) {
-               device_t child = children[i];
+       for (child = TAILQ_FIRST(&dev->children);
+            child;
+            child = TAILQ_NEXT(child, link)) {
                struct isa_device *idev = DEVTOISA(child);
                struct resource_list *rl = &idev->id_resources;
                struct resource_list_entry *rle;
@@ -831,8 +829,6 @@
                        }
                }
        }
-
-       free(children, M_TEMP);
 }
 
 static int

Reply via email to