From owner-freebsd-stable Fri Apr 5 10:23:22 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21]) by hub.freebsd.org (Postfix) with ESMTP id 455B437B417 for ; Fri, 5 Apr 2002 10:23:11 -0800 (PST) Received: from fwd02.sul.t-online.de by mailout10.sul.t-online.com with smtp id 16tYMB-0000Vg-02; Fri, 05 Apr 2002 20:22:39 +0200 Received: from frolic.no-support.loc (520094253176-0001@[80.130.218.50]) by fmrl02.sul.t-online.com with esmtp id 16tYM1-0n00KOC; Fri, 5 Apr 2002 20:22:29 +0200 Received: (from bjoern@localhost) by frolic.no-support.loc (8.11.6/8.9.3) id g35IHPr02140; Fri, 5 Apr 2002 20:17:25 +0200 (CEST) (envelope-from bjoern) From: Bjoern Fischer Date: Fri, 5 Apr 2002 20:17:24 +0200 To: =?iso-8859-1?Q?S=F8ren?= Schmidt Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Problems w/ MFCed ata driver Message-ID: <20020405181724.GB919@frolic.no-support.loc> References: <20020405152447.GA919@frolic.no-support.loc> <200204051600.g35G0ZV50417@freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <200204051600.g35G0ZV50417@freebsd.dk> User-Agent: Mutt/1.3.25i X-Sender: 520094253176-0001@t-dialin.net Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello S=F8ren, wow, about 30 minutes and the bug is fixed. That was fast. ;-) > > 1.) FreeBSD constantly crashes, when I try to detach a channel twice: [...] > > ata_detach() seems to call bus_release_resource() with > > (dev=3D0xc15a8300, type=3D1, rid=3D0, r=3D0x0; the latter one does not = seem right) > > although the channel is already detached and the kernel crashes later in > > nexus_release_resource(). >=20 > Hmm, "dont do that" :) > Its an artifact of newbus/missing devfs that it doesn't get caught,=20 > I'll think about how to do this.. Maybe by looking at ch->r_io, ch->r_altio and ch->r_irq as you do in ata_reinit(). [...] > > The process hangs in tsleep() resp. mi_switch() forever. Any further > > actions on that ata channel may lead to a crash. Everything else keeps > > running. >=20 > Oops, thats a genuine bug alright.. fixed and committed. While you're at it, please do the same for the ATAREINIT ioctl, you sleeplock the channel within the ioctl dispatcher and ata_reinit() may return without unlocking right at the start. BTW, why do the locking in the dispatcher (ataioctl()) and the unlocking in ata_reinit()? -Bj=F6rn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message