Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Sep 2001 22:44:14 +0900
From:      Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
To:        "Ilmar S. Habibulin" <ilmar@watson.org>
Cc:        freebsd-current@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject:   Re: my psm0 doesn't work with new acpi :( 
Message-ID:  <200109041344.WAA07258@zodiac.mech.utsunomiya-u.ac.jp>
In-Reply-To: Your message of "Tue, 04 Sep 2001 08:12:47 -0400." <Pine.BSF.3.96.1010904075845.52939A-100000@fledge.watson.org> 
References:  <Pine.BSF.3.96.1010904075845.52939A-100000@fledge.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109041344.WAA07258>