From owner-freebsd-current Tue Sep 4 6:35: 0 2001 Delivered-To: freebsd-current@freebsd.org Received: from nasu.utsunomiya-u.ac.jp (nasu.utsunomiya-u.ac.jp [160.12.128.3]) by hub.freebsd.org (Postfix) with ESMTP id 5F04737B406 for ; Tue, 4 Sep 2001 06:34:54 -0700 (PDT) Received: from nantai.utsunomiya-u.ac.jp by nasu.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/26Jan01-1134AM) id f84DYW5372214; Tue, 4 Sep 2001 22:34:32 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp by nantai.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/30Jan01-0241PM) id f84DYVu164555; Tue, 4 Sep 2001 22:34:31 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:ledVGGnDC0US/8QGF4bHAc1UUxgpxkqm@zodiac.mech.utsunomiya-u.ac.jp [160.12.43.7]) by zodiac.mech.utsunomiya-u.ac.jp (8.9.3+3.2W/3.7W/zodiac-May2000) with ESMTP id WAA07258; Tue, 4 Sep 2001 22:44:15 +0900 (JST) Message-Id: <200109041344.WAA07258@zodiac.mech.utsunomiya-u.ac.jp> To: "Ilmar S. Habibulin" Cc: freebsd-current@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: my psm0 doesn't work with new acpi :( In-reply-to: Your message of "Tue, 04 Sep 2001 08:12:47 -0400." References: Date: Tue, 04 Sep 2001 22:44:14 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> 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