From owner-freebsd-stable@FreeBSD.ORG Tue May 3 15:56:18 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC58316A4CE; Tue, 3 May 2005 15:56:18 +0000 (GMT) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08D4943D70; Tue, 3 May 2005 15:56:18 +0000 (GMT) (envelope-from sos@DeepCore.dk) Received: from [194.192.25.143] (laptop.deepcore.dk [194.192.25.143]) by spider.deepcore.dk (8.13.3/8.13.3) with ESMTP id j43FrnHM004763; Tue, 3 May 2005 17:53:49 +0200 (CEST) (envelope-from sos@DeepCore.dk) Message-ID: <42779EA1.4040100@DeepCore.dk> Date: Tue, 03 May 2005 17:54:09 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Mozilla Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Heybey References: <20050503114732.65bce180@stiegl.mj.niksun.com> In-Reply-To: <20050503114732.65bce180@stiegl.mj.niksun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-mail-scanned: by DeepCore Virus & Spam killer v1.12 cc: freebsd-stable@FreeBSD.ORG cc: sos@FreeBSD.ORG Subject: Re: ATA mkIII suspend problem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2005 15:56:18 -0000 Andrew Heybey wrote: > I just tried RELENG_5 as of last week and the latest (April 13) ATA > mkIII patches from http://people.freebsd.org/~sos/ATA/ on my laptop.=20 > Unfortunately, it breaks suspend-to-RAM (S3). >=20 > History: >=20 > I first tried RELENG_5 on the laptop (a Toshiba Tecra M2V) in January > and suspend did not work (the laptop hung after reinitializing the ATA > controller). Then I tried the first release of ATA mkIII. That first > version of the new ATA code made suspend work, and I was happy. >=20 > Last week, I tried upgrading to the latest RELENG_5 and the newest ATA > mkIII code, and now after suspending the kernel panics when reiniting > the ATA device(s) in ata-all.c:ata_reinit(), about line 217: >=20 > /* reinit the children and delete any that fails */ > if (!device_get_children(dev, &children, &nchildren)) { > mtx_lock(&Giant); /* newbus suckage it needs Giant */ > for (i =3D 0; i < nchildren; i++) { > if (children[i] && device_is_attached(children[i])) > if (ATA_REINIT(children[i])) { > if (ch->running->dev =3D=3D children[i]) { > ^^^^^^^^^^^^^^^^ > device_printf(ch->running->dev, > "FAILURE - device detached\n"); > ch->running->dev =3D NULL; > ch->running =3D NULL; > } > device_delete_child(dev, children[i]); > } > } > free(children, M_TEMP); > mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */= > } >=20 > The problem is that ch->running is NULL at this point. >=20 > Any suggestions on how to further debug or fix? Thats been fixed since in -current just replace the line with: if (ch->running && ch->running->dev =3D=3D children[i]) { --=20 -S=F8ren