From owner-freebsd-hackers Mon Aug 6 9:22:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mailout3-0 (mailout3-0.nyroc.rr.com [24.92.226.118]) by hub.freebsd.org (Postfix) with ESMTP id 646A537B403 for ; Mon, 6 Aug 2001 09:22:08 -0700 (PDT) (envelope-from assem@twcny.rr.com) Received: from twcny.rr.com (syr-24-92-246-130.twcny.rr.com [24.92.246.130]) by mailout3-0 (8.11.2/RoadRunner 1.03) with ESMTP id f76GKtW26549 for ; Mon, 6 Aug 2001 12:20:56 -0400 (EDT) Message-ID: <3B6EC2E5.CF2077FC@twcny.rr.com> Date: Mon, 06 Aug 2001 12:16:37 -0400 From: Assem Salama X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: detach Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I have a question. I'm trying to make a module for a PCI card. My problem is my 'detach' function never get's called when I unload the module. Al my other functions get called correctly. Here is my source: #define DRIVERNAME "ide_mod" #ifdef DEBUG #define PRINTD(STR) uprintf("%s: %s",DRIVERNAME, STR); #else #define PRINTD(STR) #endif static int ide_mod_detach(device_t dev) { PRINTD("Inside detach ... \n"); return 0; } static device_method_t ide_mod_methods[] = { /* device methods */ DEVMETHOD(device_probe, ide_mod_probe), DEVMETHOD(device_attach, ide_mod_attach), DEVMETHOD(device_detach, ide_mod_detach), {0, 0} }; static driver_t ide_mod_driver = { "ide_mod", ide_mod_methods, sizeof(ide_mod_softc), }; static devclass_t ide_mod_devclas; /* all our macros */ DRIVER_MODULE(ide_mod, atapci, ide_mod_driver, ide_mod_devclas, 0, 0); Thanks, Assem Salama To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message