From owner-freebsd-current@FreeBSD.ORG Tue Jan 13 10:09:45 2004 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 A50D516A4CE for ; Tue, 13 Jan 2004 10:09:45 -0800 (PST) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id D47F343D2F for ; Tue, 13 Jan 2004 10:09:42 -0800 (PST) (envelope-from sos@spider.deepcore.dk) Received: from spider.deepcore.dk (localhost [127.0.0.1]) by spider.deepcore.dk (8.12.10/8.12.10) with ESMTP id i0DIA1mK008002; Tue, 13 Jan 2004 19:10:01 +0100 (CET) (envelope-from sos@spider.deepcore.dk) Received: (from sos@localhost) by spider.deepcore.dk (8.12.10/8.12.10/Submit) id i0DIA1ul008001; Tue, 13 Jan 2004 19:10:01 +0100 (CET) (envelope-from sos) Message-Id: <200401131810.i0DIA1ul008001@spider.deepcore.dk> In-Reply-To: To: Randy Bush Date: Tue, 13 Jan 2004 19:10:01 +0100 (CET) Sender: sos@spider.deepcore.dk From: sos@deepcore.dk X-Mailer: ELM [version 2.4ME+ PL99f (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 X-mail-scanned: by DeepCore Virus & Spam killer v1.3 X-Mailman-Approved-At: Tue, 13 Jan 2004 11:07:09 -0800 cc: freebsd-current@FreeBSD.ORG cc: sos@deepcore.dk cc: Jeffrey Katcher Subject: Re: 5.2-CURRENT panic on startup after cvsup: probably recent ATA 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: Tue, 13 Jan 2004 18:09:45 -0000 It seems Randy Bush wrote: > >> ata1: reiniting channel .. > >> ata1: reset tp1 mask=03 ostat0=00 ostat1=00 > >> ata1-master: stat=0x00 err=0x01 lsb=0x14 msb=0xeb > >> ata1-slave: stat=0x00 err=0x01 lsb=0x14 msb=0xeb > >> ata1: reset tp2 mask=03 stat0=00 stat1=00 devices=0xc > >> ata1: resetting done .. > >> ata1-master: pio=0x0c wdma=0x22 udma=0x42 cable=40pin > >> ata1-master: setting PIO4 on Intel ICH4 chip > >> ata1-master: setting PIO4 on Intel ICH4 chip > >> ata1: device config done .. > >> > >> Fatal trap 12: page fault while in kernel mode > >> > >> Is that any help? > > > > And what do youhave on ata1 ? one ATAPI device as master ? > > in my case, there is nothing on ata1. well, at least no devices ... Well I need you boot log (verbose) as well then, since the aboveis because of a fake device that ruins lunch... Anyhow I came up with this fix that might help: Index: ata-all.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-all.c,v retrieving revision 1.199 diff -u -r1.199 ata-all.c --- ata-all.c 11 Jan 2004 22:08:34 -0000 1.199 +++ ata-all.c 13 Jan 2004 18:05:20 -0000 @@ -569,7 +569,7 @@ request->retries = 3; request->bytecount = sizeof(struct ata_params); request->transfersize = DEV_BSIZE; - while (request->retries) { + while (request->retries > 0 ) { ata_queue_request(request); if (!(error = request->result)) break; @@ -577,14 +577,8 @@ } ata_free_request(request); } - if (!isprint(atadev->param->model[0]) || - !isprint(atadev->param->model[1])) - error = ENXIO; - if (error) { - free(atadev->param, M_ATA); - atadev->param = NULL; - } - else { + if (!error && (isprint(atadev->param->model[0]) || + isprint(atadev->param->model[1]))) { struct ata_params *atacap = atadev->param; #if BYTE_ORDER == BIG_ENDIAN int16_t *ptr; @@ -612,6 +606,14 @@ ata_pmode(atacap), ata_wmode(atacap), ata_umode(atacap), (atacap->hwres & ATA_CABLE_ID) ? "80":"40"); + } + else { + if (!error) + error = ENXIO; + if (atadev->param) { + free(atadev->param, M_ATA); + atadev->param = NULL; + } } } return error; -Søren Yes I know it works under windows!!