From owner-freebsd-hackers Sun Nov 5 14:52:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (unknown [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id D0F3C37B479 for ; Sun, 5 Nov 2000 14:52:11 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.0/8.11.0) with ESMTP id eA5Mq6n59532; Sun, 5 Nov 2000 15:52:06 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id PAA04067; Sun, 5 Nov 2000 15:52:05 -0700 (MST) Message-Id: <200011052252.PAA04067@harmony.village.org> To: Rink Springer VII Subject: Re: KLD's on ISA: another problem Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sun, 05 Nov 2000 16:37:57 GMT." <00110516524700.91928@aurum.springer.cx> References: <00110516524700.91928@aurum.springer.cx> <3A044899.9020508@springer.cx> <200011042344.QAA37170@harmony.village.org> Date: Sun, 05 Nov 2000 15:52:05 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <00110516524700.91928@aurum.springer.cx> Rink Springer VII writes: : 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); : } You need to check to see if the child is already there or not before adding it. : But upon loading, it *CRASHES* (!) FreeBSD after the dl0: DONE thing... You shouldn't hold any resources after your probe routine. You must free them. It is also generally a bad idea to store things in softc in probe as the device framework is free to destroy the softc iirc. Make sure that your softc size is specified properly, otherwise you may crash. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message