Date: Tue, 19 Oct 2004 22:53:51 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@DeepCore.dk> To: Johannes Lochmann <j.lochmann@i-penta.at> Cc: freebsd-current@freebsd.org Subject: Re: No booting - ata1-slave: FAILURE Message-ID: <41757EDF.8080504@DeepCore.dk> In-Reply-To: <200410191239.36845.j.lochmann@i-penta.at> References: <4171AA66.2050005@gmx.de> <4172A2D0.2060202@DeepCore.dk> <20041018210000.GA753@zaphod.nitro.dk> <200410191239.36845.j.lochmann@i-penta.at>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41757EDF.8080504>