Date: Sun, 05 Nov 2000 15:52:05 -0700 From: Warner Losh <imp@village.org> To: Rink Springer VII <rink@springer.cx> Cc: hackers@FreeBSD.ORG Subject: Re: KLD's on ISA: another problem Message-ID: <200011052252.PAA04067@harmony.village.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011052252.PAA04067>