From owner-freebsd-hackers Sun Nov 5 6:54:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from aurum.springer.cx (cgmd77002.chello.nl [212.83.77.2]) by hub.freebsd.org (Postfix) with ESMTP id 3366637B479 for ; Sun, 5 Nov 2000 06:54:23 -0800 (PST) Received: by aurum.springer.cx (8.9.3/8.9.3) id QAA91961; Sun, 5 Nov 2000 16:52:47 GMT (envelope-from rink) From: Rink Springer VII To: Warner Losh Subject: KLD's on ISA: another problem Date: Sun, 5 Nov 2000 16:37:57 +0000 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain Cc: hackers@FreeBSD.ORG References: <3A044899.9020508@springer.cx> <200011042344.QAA37170@harmony.village.org> In-Reply-To: <200011042344.QAA37170@harmony.village.org> MIME-Version: 1.0 Message-Id: <00110516524700.91928@aurum.springer.cx> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi guys, It works nicer now... the IDENTIFY code will now happily tell FreeBSD the device is at 0x378, IRQ 7. The code I used for this is: static void dl_identify (driver_t* driver,device_t parent) { device_t t; printf ("DL: IDENTIFY\n"); t = BUS_ADD_CHILD (parent, 0, "dl", 0); bus_set_resource (t, SYS_RES_IOPORT, 0, 0x378, 3); bus_set_resource (t, SYS_RES_IRQ, 0, 7, 1); } static int dl_probe (device_t dev) { struct dl_softc* sc = device_get_softc (dev); int rid = 0; sc->ioaddr = bus_get_resource_start (dev, SYS_RES_IOPORT, 0); sc->iobase = bus_alloc_resource (dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 3, RF_ACTIVE); /* [error check code] */ sc->ioaddr = rman_get_start (sc->iobase); /* [probe stuff] */ return 0; } static int dl_attach (device_t dev) { int rid; struct dl_softc* sc = device_getr_softc(dev); void *ih; printf ("dl0: grab IRQ\n"); sc->irqbase = bus_alloc_resource (dev, SYS_RES_IRQ, &rid, 0ul, ~0ul, 1, RF_ACTIVE); /* [ error check ] */ printf ("dl0: set IRQ handkler\n"); if (bus_setup_intr (dev, sc->irqbase, INTR_TYPE_NET, dl_intr, (void*)sc, &ih)) { /* [error check] */ } printf ("dl0: DONE!\n"); } But upon loading, it *CRASHES* (!) FreeBSD after the dl0: DONE thing... HELP! Anyone know how I can fix this? Sorry for all those messages lately, but I really want this to work! Thanks! --Rink To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message