From owner-freebsd-current@FreeBSD.ORG Wed Dec 24 08:55:57 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D23816A4CE for ; Wed, 24 Dec 2003 08:55:57 -0800 (PST) Received: from st68.arena.ne.jp (st68.arena.ne.jp [203.138.213.2]) by mx1.FreeBSD.org (Postfix) with SMTP id C084E43D46 for ; Wed, 24 Dec 2003 08:55:55 -0800 (PST) (envelope-from eyes@navi.org) Received: (qmail 12429 invoked by SAV 20031121.8); 25 Dec 2003 01:55:54 +0900 Received: from unknown (HELO localhost) (219.167.192.150) by st68.arena.ne.jp with SMTP; 25 Dec 2003 01:55:54 +0900 Date: Thu, 25 Dec 2003 01:56:33 +0900 From: Hiroyuki Aizu To: Nate Lawson Message-Id: <20031225015633.27341e18.eyes@navi.org> In-Reply-To: <20031223172258.B93254@root.org> References: <20031223172258.B93254@root.org> Organization: navi.org X-Mailer: Sylpheed version 0.9.5-gtk2-20030906 (GTK+ 2.2.4; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: More info: ATA hang on resume X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2003 16:55:57 -0000 Hi. On Tue, 23 Dec 2003 17:38:39 -0800 (PST) Nate Lawson wrote: > I did some more tracing on this and found that the reset of ata0 is indeed > hanging. My machine does not have an APIC, just a simple PIC laptop (IBM > T23). I've disabled most devices and am not using atapi-cam. I have same problem on TOSHIBA Libretto L5. Recently I found simple but effective solution. The ata controller is like this (from dmesg). # atapci0: port 0xe9f0-0xe9ff at device 16.0 on pci0 Try this patch. (However I don't know this effect to ThinkPad' ata controller.) -- Hiroyuki Aizu. --- ata-all.c.orig Mon Dec 1 20:24:13 2003 +++ ata-all.c Thu Dec 25 00:00:44 2003 @@ -230,6 +230,7 @@ int ata_reinit(struct ata_channel *ch) { + int i; struct ata_request *request = ch->running; int devices, misdev, newdev; @@ -241,7 +242,11 @@ ATA_FORCELOCK_CH(ch, ATA_CONTROL); ch->running = NULL; devices = ch->devices; - ch->hw.reset(ch); + for (i=0; i < 10; i++) { + ch->hw.reset(ch); + if (devices == ch->devices) + break; + } ATA_UNLOCK_CH(ch); /* detach what left the channel during reset */