From owner-cvs-all Wed Jul 4 23:50:29 2001 Delivered-To: cvs-all@freebsd.org Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (Postfix) with ESMTP id 563B237B401; Wed, 4 Jul 2001 23:50:22 -0700 (PDT) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.9.3/8.9.3) with UUCP id IAA11848; Thu, 5 Jul 2001 08:50:21 +0200 (CEST) Received: (from j@localhost) by uriah.heep.sax.de (8.11.4/8.11.4) id f656ncH27360; Thu, 5 Jul 2001 08:49:38 +0200 (MET DST) (envelope-from j) Date: Thu, 5 Jul 2001 08:49:38 +0200 From: Joerg Wunsch To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/isa fd.c Message-ID: <20010705084938.A27341@uriah.heep.sax.de> Reply-To: Joerg Wunsch References: <200107042210.f64MAa704405@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200107042210.f64MAa704405@freefall.freebsd.org>; from joerg@FreeBSD.org on Wed, Jul 04, 2001 at 03:10:36PM -0700 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG As Joerg Wunsch wrote: > Still, kldunloading leaves remnants of the previously existing devices > intact. Why doesn't it destroy all the devices? As a consequence, > since dev->descr now points into no longer allocated memory, the > system panics deep inside printf(9) when running devinfo(1) after > kldunloading the module. Ideas sought... Interestingly enough, removing the PCMCIA floppy then fully destroyed the device -- even if the driver has been kldunloaded already before. I could understand that even in cases where the driver is no longer there but the device hardware still is, the internal device should stay (for whatever reason). But then, we need to clean out all the mess the driver might have caused in struct device (like setting a device description to a string that does no longer exist). Who's responsible for this? The driver that's going to be unloaded, or the bus code? Still, i don't see much point in leaving the device instances to survive, since upon the next driver kldload, the old struct devices will (IMHO) first delete the old device instances anyway. Still showing them in devinfo(1) while there's no driver doesn't make much sense (and is inconsistent with the world's view before the driver was first loaded, since by then it was completely unknown that some device hardware would exist, thus devinfo didn't show it either). -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message