From owner-freebsd-mobile@FreeBSD.ORG Fri Jan 28 07:51:55 2005 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 458E416A4CE for ; Fri, 28 Jan 2005 07:51:55 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3341043D46 for ; Fri, 28 Jan 2005 07:51:54 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id j0S7pkXP016384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 28 Jan 2005 10:51:47 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id j0S7pjlv088259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Jan 2005 10:51:46 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id j0S7picd088258; Fri, 28 Jan 2005 10:51:44 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Fri, 28 Jan 2005 10:51:44 +0300 From: Gleb Smirnoff To: Dave Walton Message-ID: <20050128075144.GA88243@cell.sick.ru> References: <41EF6101.7010008@acm.org> <20050120092812.GB16150@cell.sick.ru> <41F02F9A.40201@acm.org> <41F0A398.7080800@orel.ru> <41F4C6BD.4060406@acm.org> <41F4D7EE.9030108@orel.ru> <41F8C5EA.3040007@acm.org> <20050127140010.GA82418@cell.sick.ru> <41F94FAA.2070307@acm.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <41F94FAA.2070307@acm.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: ClamAV version devel-20050125, clamav-milter version 0.80ff on relay.bestcom.ru X-Virus-Status: Clean cc: freebsd-mobile@freebsd.org cc: Andrew Belashov Subject: Re: Trouble with APM suspend in 5.3-R X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2005 07:51:55 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Thu, Jan 27, 2005 at 12:31:38PM -0800, Dave Walton wrote: D> It was on, now that you mention it. Why do you ask? Can you try the attached patch? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="ata-all.patch" Index: ata-all.c =================================================================== RCS file: /home/cvs/ncvs/src/sys/dev/ata/ata-all.c,v retrieving revision 1.232 diff -u -u -r1.232 ata-all.c --- ata-all.c 13 Oct 2004 15:16:35 -0000 1.232 +++ ata-all.c 19 Oct 2004 19:30:59 -0000 @@ -86,6 +86,7 @@ static struct intr_config_hook *ata_delayed_attach = NULL; static int ata_dma = 1; static int atapi_dma = 1; +static int ata_resuming = 0; /* sysctl vars */ SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); @@ -364,8 +380,10 @@ if (!dev || !(ch = device_get_softc(dev))) return ENXIO; + ata_resuming = 1; error = ata_reinit(ch); ata_start(ch); + ata_resuming = 0; return error; } @@ -838,7 +944,7 @@ void ata_udelay(int interval) { - if (interval < (1000000/hz) || ata_delayed_attach) + if (interval < (1000000/hz) || ata_delayed_attach || ata_resuming) DELAY(interval); else tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz)); --GvXjxJ+pjyke8COw--