>> Please apply the attached patch in /sys/isa and see what it does.
>It does panic with a smiling face ;-)))
>
>panic message was "bad ivar read request"

Would try the following patch for /sys/isa/psm.c IN ADDITION TO
my previous patch?

(This is a test patch. It's not a final fix.)

Kazu

--- psm.c-save  Tue Sep  4 20:51:39 2001
+++ psm.c       Tue Sep  4 22:29:49 2001
@@ -779,12 +779,8 @@
 psmidentify(driver_t *driver, device_t parent)
 {
 
-    /* if we are in PnP mode, don't create a device node for now... */
-    if (isa_get_vendorid(parent) != 0)
-       return;
-
     /* always add at least one child */
-    BUS_ADD_CHILD(parent, 0, driver->name, -1);
+    BUS_ADD_CHILD(parent, 0, NULL, -1);
 }
 
 #define endprobe(v)    {   if (bootverbose)                            \
@@ -814,6 +810,17 @@
     BUS_READ_IVAR(device_get_parent(dev), dev, KBDC_IVAR_IRQ, &irq);
     BUS_READ_IVAR(device_get_parent(dev), dev, KBDC_IVAR_FLAGS, &flags);
 
+    /* see if IRQ is available */
+    rid = 0;
+    sc->intr = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, irq, irq, 1,
+                                 RF_ACTIVE);
+    if (sc->intr == NULL) {
+       if (bootverbose)
+            device_printf(dev, "unable to allocate the IRQ resource (%d).\n",
+                         (int)irq);
+        return (ENXIO);
+    }
+
     sc->kbdc = atkbdc_open(device_get_unit(device_get_parent(dev)));
     sc->config = flags & PSM_CONFIG_FLAGS;
     /* XXX: for backward compatibility */
@@ -1083,19 +1090,8 @@
         endprobe(ENXIO);
     }
 
-    /* see if IRQ is available */
-    rid = 0;
-    sc->intr = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, irq, irq, 1,
-                                 RF_ACTIVE);
-    if (sc->intr == NULL) {
-        printf("psm%d: unable to allocate the IRQ resource (%d).\n",
-              unit, (int)irq);
-        endprobe(ENXIO);
-    } else {
-       bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr);
-    }
-
     /* done */
+    bus_release_resource(dev, SYS_RES_IRQ, rid, sc->intr);
     kbdc_set_device_mask(sc->kbdc, mask | KBD_AUX_CONTROL_BITS);
     kbdc_lock(sc->kbdc, FALSE);
     return (0);

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to