From owner-freebsd-emulation@FreeBSD.ORG Thu Oct 2 08:50:20 2003 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5335016A4B3 for ; Thu, 2 Oct 2003 08:50:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CD1C43FCB for ; Thu, 2 Oct 2003 08:50:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h92FoJFY016777 for ; Thu, 2 Oct 2003 08:50:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h92FoJNF016776; Thu, 2 Oct 2003 08:50:19 -0700 (PDT) (envelope-from gnats) Date: Thu, 2 Oct 2003 08:50:19 -0700 (PDT) Message-Id: <200310021550.h92FoJNF016776@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= Subject: Re: ports/57465 kldunload rtc.ko causes a panic; yet it's in rc.d script X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 15:50:20 -0000 The following reply was made to PR ports/57465; it has been noted by GNATS. From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= To: freebsd-gnats-submit@FreeBSD.org, w@expro.pl Cc: Subject: Re: ports/57465 kldunload rtc.ko causes a panic; yet it's in rc.d script Date: Thu, 2 Oct 2003 08:45:19 -0700 (PDT) I ran into this some time ago, and found that you get different results depending on whether the device has been opened or not. Have you tried kldunloading "rtc" w/o using it first, e.g. directly after boot? I've been using the following patch for a while: --- rtc.c.org Wed Aug 20 20:41:50 2003 +++ rtc.c Thu Oct 2 08:40:37 2003 @@ -299,7 +299,8 @@ DLog(Lfail, "%p busy", sc); return error; } - destroy_dev(rtc_dev); + if (sc == NULL) + destroy_dev(rtc_dev); #if __FreeBSD_version < 500104 error = cdevsw_remove(&rtc_cdevsw); #endif Which seems to work find for me in all cases. I made a mental note to submit a PR once I've tested out the fix, and then of course, I forgot all about it... :) $.02, /Mikko