No booting - ata1-slave: FAILURE
Søren Schmidt
sos at DeepCore.dk
Tue Oct 19 13:54:18 PDT 2004
Johannes Lochmann wrote:
> On Monday 18 October 2004 23:00, Simon L. Nielsen wrote:
>
>>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.
>
>
> same here for an IBM Thinkpad T40P (with and without patch).
>
OK, try this patch for releng_5 and let me know...
--
-Søren
-------------- next part --------------
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");
More information about the freebsd-current
mailing list