From owner-freebsd-current@FreeBSD.ORG Tue Oct 19 20:54:18 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 5127C16A4CE for ; Tue, 19 Oct 2004 20:54:18 +0000 (GMT) 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 7711543D2F for ; Tue, 19 Oct 2004 20:54:17 +0000 (GMT) (envelope-from sos@DeepCore.dk) Received: from [194.192.25.143] (laptop.deepcore.dk [194.192.25.143]) by spider.deepcore.dk (8.12.11/8.12.10) with ESMTP id i9JKsCVu044828; Tue, 19 Oct 2004 22:54:15 +0200 (CEST) (envelope-from sos@DeepCore.dk) Message-ID: <41757EDF.8080504@DeepCore.dk> Date: Tue, 19 Oct 2004 22:53:51 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Mozilla Thunderbird 0.7.2 (X11/20040802) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Johannes Lochmann References: <4171AA66.2050005@gmx.de> <4172A2D0.2060202@DeepCore.dk> <20041018210000.GA753@zaphod.nitro.dk> <200410191239.36845.j.lochmann@i-penta.at> In-Reply-To: <200410191239.36845.j.lochmann@i-penta.at> Content-Type: multipart/mixed; boundary="------------060403030602060001030604" X-mail-scanned: by DeepCore Virus & Spam killer v1.4 cc: freebsd-current@freebsd.org Subject: Re: No booting - ata1-slave: FAILURE 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, 19 Oct 2004 20:54:18 -0000 This is a multi-part message in MIME format. --------------060403030602060001030604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Johannes Lochmann wrote: > On Monday 18 October 2004 23:00, Simon L. Nielsen wrote: >=20 >>I'm not sure if I dare to tell you... :-) but my Thinkpad R40 also >>hangs now with RELENG_5 from today. It's OK with 5.3-BETA7 from Oct >>10. >> >>The patch below did not fix it. I haven't tried backstepping ata(4) >>yet, but I will do that shortly. >=20 >=20 > same here for an IBM Thinkpad T40P (with and without patch). >=20 OK, try this patch for releng_5 and let me know... --=20 -S=F8ren --------------060403030602060001030604 Content-Type: text/plain; name="ata-fix2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ata-fix2" Index: ata-queue.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-queue.c,v retrieving revision 1.32.2.4 diff -u -r1.32.2.4 ata-queue.c --- ata-queue.c 16 Oct 2004 08:43:06 -0000 1.32.2.4 +++ ata-queue.c 19 Oct 2004 20:50:23 -0000 @@ -182,15 +182,13 @@ /* check for the right state */ mtx_lock(&ch->state_mtx); if (ch->state == ATA_IDLE) { + ATA_DEBUG_RQ(request, "starting"); TAILQ_REMOVE(&ch->ata_queue, request, chain); ch->running = request; - - ATA_DEBUG_RQ(request, "starting"); - + ch->state = ATA_ACTIVE; if (!dumping) callout_reset(&request->callout, request->timeout * hz, (timeout_t*)ata_timeout, request); - if (ch->hw.begin_transaction(request) == ATA_OP_FINISHED) { ch->running = NULL; ch->state = ATA_IDLE; @@ -200,8 +198,6 @@ ata_finish(request); return; } - else - ch->state = ATA_ACTIVE; } mtx_unlock(&ch->state_mtx); } @@ -242,14 +238,9 @@ /* if we had a timeout, reinit channel and deal with the falldown */ if (request->flags & ATA_R_TIMEOUT) { - int error = ata_reinit(ch); - /* if our device disappeared return as cleanup was done already */ - if (!request->device->param) - return; - /* if reinit succeeded and retries still permit, reinject request */ - if (!error && request->retries-- > 0) { + if (ata_reinit(ch) && request->retries-- > 0) { request->flags &= ~(ATA_R_TIMEOUT | ATA_R_DEBUG); request->flags |= (ATA_R_IMMEDIATE | ATA_R_REQUEUE); ATA_DEBUG_RQ(request, "completed reinject"); --------------060403030602060001030604--