From owner-freebsd-current@FreeBSD.ORG Sun Jul 16 10:29:26 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 4A61816A4DA for ; Sun, 16 Jul 2006 10:29:26 +0000 (UTC) (envelope-from sos@deepcore.dk) 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 BF59F43D4C for ; Sun, 16 Jul 2006 10:29:25 +0000 (GMT) (envelope-from sos@deepcore.dk) Received: from [194.192.25.130] (sos.deepcore.dk [194.192.25.130]) by spider.deepcore.dk (8.13.6/8.13.4) with ESMTP id k6GATOBN017856; Sun, 16 Jul 2006 12:29:24 +0200 (CEST) (envelope-from sos@deepcore.dk) Message-ID: <44BA1504.7000407@deepcore.dk> Date: Sun, 16 Jul 2006 12:29:24 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5.0.2 (X11/20060531) MIME-Version: 1.0 To: Anish Mistry References: <200606161333.07522.mistry.7@osu.edu> <44A598BC.20200@deepcore.dk> <200606302214.59249.mistry.7@osu.edu> <200607121346.24280.mistry.7@osu.edu> In-Reply-To: <200607121346.24280.mistry.7@osu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 Cc: freebsd-current@freebsd.org Subject: Re: After install - Fatal trap 18 ATA problem? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 16 Jul 2006 10:29:26 -0000 Anish Mistry wrote: > On Friday 30 June 2006 22:14, Anish Mistry wrote: > >> On Friday 30 June 2006 17:33, you wrote: >> >>> Anish Mistry wrote: >>> >>>> On Friday 30 June 2006 16:54, you wrote: >>>> >>>>> Anish Mistry wrote: >>>>> >>>>>>> No, it fell through the cracks somewhere... >>>>>>> >>>>>>> Do you still have the HW in question so tests can be done ? >>>>>>> >>>>>> Yes, in the exact same configuration >>>>>> >>>>> OK, so lets start over, I've not been following this, could >>>>> you get me a dmesg from a verbose booted system please ? >>>>> It fails because the disk geometry is invalid right ? >>>>> >>>> http://am-productions.biz/docs/boot-panic-script.txt.gz >>>> >>>> The email I sent earlier today contains all of the details >>>> including the above link. Let me know if you need further >>>> clarification. >>>> >>> OK, in ata-disk.c::ad_attach the following lines is around line >>> 100: >>> >>> if (atadev->param.atavalid & ATA_FLAG_54_58) { >>> adp->heads = atadev->param.current_heads; >>> adp->sectors = atadev->param.current_sectors; >>> adp->total_secs = (u_int32_t)atadev->param.current_size_1 >>> | ((u_int32_t)atadev->param.current_size_2 << 16); } >>> else { >>> adp->heads = atadev->param.heads; >>> adp->sectors = atadev->param.sectors; >>> adp->total_secs = atadev->param.cylinders * adp->heads * >>> adp->sectors; >>> } >>> >>> It would seem that the wrong way of getting at the >>> cyl/head/sector is used for your disk. >>> My guess is that ->param.current_* isn't set correctly in your >>> disk (firmware / BIOS mishap), so we need to take the old >>> defaults instead. That is instead of relying on good values as >>> the ATA_FLAG_54_58 was supposed to say, we also need to check the >>> values for sane settings. >>> >>> I just love how hard it is to understand the word "shall" in >>> standards, sigh.... >>> >> Changing that bit to the following fixed it and allows it to boot. >> >> if (atadev->param.atavalid & ATA_FLAG_54_58) { >> adp->heads = atadev->param.current_heads; >> adp->sectors = atadev->param.current_sectors; >> adp->total_secs = (u_int32_t)atadev->param.current_size_1 | >> ((u_int32_t)atadev->param.current_size_2 << 16); >> } >> if (!(atadev->param.atavalid & ATA_FLAG_54_58) || >> ((atadev->param.atavalid & ATA_FLAG_54_58) && (adp->heads == 0 || >> adp->sectors == 0))) { >> adp->heads = atadev->param.heads; >> adp->sectors = atadev->param.sectors; >> adp->total_secs = atadev->param.cylinders * adp->heads * >> adp->sectors; >> } >> > Do you have an ETA on committing this fix? Or is there something > wrong with the change? > I've been out-of-office for the last week so thats why... It needs a bit more refinement to be on the safe side however, I'll get it in there, no worries... -Søren > Thanks, > >