From owner-freebsd-stable Sun Nov 17 15: 5:25 2002 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 7EB7537B401 for ; Sun, 17 Nov 2002 15:05:22 -0800 (PST) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id B10AD43E4A for ; Sun, 17 Nov 2002 15:05:21 -0800 (PST) (envelope-from thomas@FreeBSD.ORG) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 5CE832C3D1; Mon, 18 Nov 2002 00:05:20 +0100 (CET) Date: Mon, 18 Nov 2002 00:05:20 +0100 From: Thomas Quinot To: Christian Brueffer Cc: freebsd-stable@freebsd.org Subject: Re: apm suspend/resume panic - atapicam related Message-ID: <20021117230520.GB31217@melusine.cuivre.fr.eu.org> Reply-To: Thomas Quinot References: <20021117032558.GF11536@unixpages.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20021117032558.GF11536@unixpages.org> User-Agent: Mutt/1.4i X-message-flag: WARNING! Using Outlook can damage your computer. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Le 2002-11-17, Christian Brueffer écrivait : > fangorn# ata0: resetting devices .. done > ata1: resetting devices .. ata1-slave: ATAPI identify retries exceeded > done OK, it looks to me like we are invalidating the param field of the struct atadev for your ata1 slave (BTW, a complete dmesg.boot would be useful here. > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x1 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc0155171 > stack pointer = 0x10:0xc032c8b4 > frame pointer = 0x10:0xc032c8b4 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = Idle > interrupt mask = bio > kernel: type 12 trap, code=0 > Stopped at atapi_start+0x9: movzbw 0x1(%eax),%ax > db> tr > atapi_start(c15d0f50) at atapi_start+0x9 > ata_start(c15d0f00,c02ebe16,c15c3900,c03957c0,4000000) at ata_start+0xda > ata_reinit(c15d0f00,c15c3900,c032c900,c01291a6,c15c3900) at ata_reinit+0x2ed Makes sense. What I cannot entirely figure out is why this does not happen when you disable ATAPI/CAM. Supposing that your ATAPI device is a CD drive, do you also have atapicd in the kernel? Does the 'identify retries exceeded message' also occur when you disable atapicam? When you disable atapicam, is atapicd enabled? Also, it would be interesting to know whether the enclosed patch works around the problem. It is likely to make your ata1-slave device unusable after a suspend/resume, in which case you should then perform an 'atacontrol reinit 1' and see if it improves the situation. If you can test this, please also do an 'atacontrol list 1' and 'camcontrol devlist' at each step. Thanks for taking the time to report this issue! Thomas. Index: ata-all.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-all.c,v retrieving revision 1.158 diff -u -r1.158 ata-all.c --- ata-all.c 7 Nov 2002 22:23:46 -0000 1.158 +++ ata-all.c 17 Nov 2002 22:59:28 -0000 @@ -906,14 +906,20 @@ if (newdev & ATA_ATAPI_MASTER && !ch->device[MASTER].driver) atapi_attach(&ch->device[MASTER]); else if (ch->devices & (ATA_ATAPI_MASTER) && ch->device[MASTER].driver) { - ata_getparam(&ch->device[MASTER], ATA_C_ATAPI_IDENTIFY); - atapi_reinit(&ch->device[MASTER]); + if (ata_getparam(&ch->device[MASTER], ATA_C_ATAPI_IDENTIFY)) { + ata_printf(ch, ATA_MASTER, "ata_getparam failed\n"); + ch->devices &= ~ATA_ATAPI_MASTER; + } else + atapi_reinit(&ch->device[MASTER]); } if (newdev & ATA_ATAPI_SLAVE && !ch->device[SLAVE].driver) atapi_attach(&ch->device[SLAVE]); else if (ch->devices & (ATA_ATAPI_SLAVE) && ch->device[SLAVE].driver) { - ata_getparam(&ch->device[SLAVE], ATA_C_ATAPI_IDENTIFY); - atapi_reinit(&ch->device[SLAVE]); + if (ata_getparam(&ch->device[SLAVE], ATA_C_ATAPI_IDENTIFY)) { + ata_printf(ch, ATA_SLAVE, "ata_getparam failed\n"); + ch->devices &= ~ATA_ATAPI_SLAVE; + } else + atapi_reinit(&ch->device[SLAVE]); } #endif #ifdef DEV_ATAPICAM -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message