From owner-freebsd-current@FreeBSD.ORG Thu Jan 15 10:35:19 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 D13F116A4CE for ; Thu, 15 Jan 2004 10:35:19 -0800 (PST) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 2233343D3F for ; Thu, 15 Jan 2004 10:35:17 -0800 (PST) (envelope-from nate@root.org) Received: (qmail 71724 invoked by uid 1000); 15 Jan 2004 18:35:17 -0000 Date: Thu, 15 Jan 2004 10:35:17 -0800 (PST) From: Nate Lawson To: current@freebsd.org Message-ID: <20040115102553.P71659@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: ata boot still broken (hang) 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: Thu, 15 Jan 2004 18:35:19 -0000 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