From owner-freebsd-acpi@FreeBSD.ORG Fri Apr 14 16:21:02 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 E6DBD16A407; Fri, 14 Apr 2006 16:21:02 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1920643D5C; Fri, 14 Apr 2006 16:21:00 +0000 (GMT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (ns01.locore.org [218.45.21.227]) by locore.org (8.13.6/8.13.6/iwasaki) with ESMTP/inet id k3EGKwSS048674; Sat, 15 Apr 2006 01:20:59 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sat, 15 Apr 2006 01:20:59 +0900 (JST) Message-Id: <20060415.012059.130244002.iwasaki@jp.FreeBSD.org> To: sos@freebsd.org From: Mitsuru IWASAKI In-Reply-To: <1145029263.912.4.camel@sos.deepcore.dk> References: <20060414.180622.30189283.iwasaki@jp.FreeBSD.org> <20060414.233013.41626908.iwasaki@jp.FreeBSD.org> <1145029263.912.4.camel@sos.deepcore.dk> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org, 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: Fri, 14 Apr 2006 16:21:03 -0000 Hi, > --- 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 = 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 == ATA_IDLE) { > ch->state = ATA_ACTIVE; > > That I'll gladly commit for you instead... Yes, This have also the same effect. I prefer this. Thanks!