ata boot still broken (hang)

Nate Lawson nate at root.org
Thu Jan 15 10:35:19 PST 2004


The previous commit fixed the panic in ata_getparam() that was introduced
in ata-all.c:1.199.  But now the system hangs forever while booting.  The
system is an ICH3 laptop with one hard drive primary master and a cdrom
secondary master.  It worked fine before rev 1.199 (2004/1/11).

I broke into DDB and found this process info:

0 [swapper]  [CV] ATA request done 0xc3893be0

Its stack trace was:

sched_switch
mi_switch
_sema_wait
ata_queue_request+0x217
ata_getparam+0xb8
ata_identify_devices+0x5f
ata_boot_attach+0x2f
...

Here is the context.  It appears the line numbers are off slightly so I've
indicated the actual lines below.

0xc045e6f7 is in ata_queue_request (../../../dev/ata/ata-queue.c:102).
97              if (!request->callback) {
98                  ATA_DEBUG_RQ(request, "wait for completition");
99  -->             sema_wait(&request->done);
100             }
101         }
102         if (!request->callback)
103             sema_destroy(&request->done);
104     }
105
106     int

0xc045d718 is in ata_getparam (../../../dev/ata/ata-all.c:581).
576                 request->retries = 3;
577                 request->bytecount = sizeof(struct ata_params);
578                 request->transfersize = DEV_BSIZE;
579                 while (request->retries > 0 ) {
580 -->                 ata_queue_request(request);
581                     if (!(error = request->result))
582                         break;
583                     request->retries--;
584                 }
585                 ata_free_request(request);

0xc045d93f is in ata_identify_devices (../../../dev/ata/ata-all.c:641).
636             else
637                 ch->device[SLAVE].attach = ad_attach;
638     #endif
639         }
640         if (ch->devices & ATA_ATAPI_SLAVE) {
641 -->         if (ata_getparam(&ch->device[SLAVE], ATA_ATAPI_IDENTIFY))
642                 ch->devices &= ~ATA_ATAPI_SLAVE;
643             else {
644                 switch (ch->device[SLAVE].param->config & ATA_ATAPI_TYPE_MASK) {
645     #ifdef DEV_ATAPICD

-Nate


More information about the freebsd-current mailing list