From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 15 10:13:17 2006 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C010816A400; Sat, 15 Apr 2006 10:13:17 +0000 (UTC) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 944B243D46; Sat, 15 Apr 2006 10:13:16 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from ury.york.ac.uk (ury.york.ac.uk [144.32.108.81]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id k3FADDDK006684; Sat, 15 Apr 2006 11:13:13 +0100 (BST) Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.13.4/8.13.4) with ESMTP id k3FADDPu034112; Sat, 15 Apr 2006 11:13:13 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.13.4/8.13.1/Submit) with ESMTP id k3FADC90034109; Sat, 15 Apr 2006 11:13:12 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Sat, 15 Apr 2006 11:13:12 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: =?ISO-8859-1?Q?S=F8ren?= Schmidt In-Reply-To: <1145029263.912.4.camel@sos.deepcore.dk> Message-ID: <20060415111208.Q34088@ury.york.ac.uk> References: <20060413.012156.56054177.iwasaki@jp.FreeBSD.org> <443F54DF.3080809@root.org> <20060414.180622.30189283.iwasaki@jp.FreeBSD.org> <20060414.233013.41626908.iwasaki@jp.FreeBSD.org> <1145029263.912.4.camel@sos.deepcore.dk> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-767519609-1145095992=:34088" X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin.atkinson@ury.york.ac.uk Cc: acpi@freebsd.org, Mitsuru IWASAKI , current@freebsd.org Subject: Re: CFR: ACPI Dock driver X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2006 10:13:17 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-767519609-1145095992=:34088 Content-Type: TEXT/PLAIN; charset=iso8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 14 Apr 2006, [ISO-8859-1] S=F8ren Schmidt wrote: > On Fre, 2006-04-14 at 23:30 +0900, Mitsuru IWASAKI wrote: >> Hi, Soren. >> I've found the problem with detached ATA channel suspending. >> After detaching second channel, the system drops into infinity >> loop at ata_suspend(). >> I'll commit the following patches with acpi_dock patches, so >> please refine these if they have any problem. > > Uhm, would this simple patch help you ? > > --- ata-all.c 31 Mar 2006 08:09:04 -0000 1.271 > +++ ata-all.c 14 Apr 2006 15:39:20 -0000 > @@ -277,8 +277,8 @@ > if (!dev || !(ch =3D device_get_softc(dev))) > return ENXIO; > > - /* wait for the channel to be IDLE before entering suspend mode */ > - while (1) { > + /* wait for the channel to be IDLE or detached before suspending */ > + while (ch->r_irq) { > mtx_lock(&ch->state_mtx); > if (ch->state =3D=3D ATA_IDLE) { > ch->state =3D ATA_ACTIVE; > > That I'll gladly commit for you instead... Is there any chance this will also fix the panic myself and several others= =20 have been seeing with suspend and CD-ROM drives? http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2005-08/0996.html I'll take my laptop to top-of-tree CURRENT in the next day or so to try=20 it. Gavin --0-767519609-1145095992=:34088--