From owner-freebsd-hackers Tue May 30 11: 5:53 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 95A4137B5CB for ; Tue, 30 May 2000 11:05:49 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id MAA42346; Tue, 30 May 2000 12:05:47 -0600 (MDT) (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 MAA17843; Tue, 30 May 2000 12:05:27 -0600 (MDT) Message-Id: <200005301805.MAA17843@harmony.village.org> To: Doug Rabson Subject: Re: subr_bus.c | kldload | kldunload Cc: Bob Kot , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 30 May 2000 08:50:50 BST." References: Date: Tue, 30 May 2000 12:05:27 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message Doug Rabson writes: : Without seeing the code, it appears that you are creating a new device : instance each time the module is loaded. Probably you should try to only : do this the first time (e.g. by looking to see if device msm0 : exists). This part of the interface could use some improvement. Yes. I've had to explain very carefully that the instance tree is different than strucutres used to hold the drivers so it is OK for the underlying driver to go away (assuming the usual caveats about disconnecting interrupts and the like). This does makeit hard to debug the identify routine if you are trying to automagically detect the device, or if you are using the hints mechanism to move the device after the first load of the driver. : > Knowing that my in-experienced approach at getting my msm_probe() : > and msm_attach() to execute may not be the right way to do things, : > I will start by just asking for a referral to some other driver : > that is implemented as a module with the newbus architecture, that : > will kldload / kldunload with no side effects and that preferably is : > an ISA device. If no one responds to this request I will repost with : > actual code and a laundry list of observed symptoms. : : Warner Losh might be able to help you out here. There is my iopener led driver that might be a good stard. I'm writing some articles about this now, but have been so swamped that I'm not sure when I'll get them done :-(. You can download the led driver from: http://people.freebsd.org/~imp/led.tar.gz Please let me know if you have problems with this, or comments on this. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message