Date: Wed, 12 Jul 2006 13:46:09 -0400 From: Anish Mistry <mistry.7@osu.edu> To: =?iso-8859-1?q?S=F8ren_Schmidt?= <sos@deepcore.dk> Cc: freebsd-current@freebsd.org Subject: Re: After install - Fatal trap 18 ATA problem? Message-ID: <200607121346.24280.mistry.7@osu.edu> In-Reply-To: <200606302214.59249.mistry.7@osu.edu> References: <200606161333.07522.mistry.7@osu.edu> <44A598BC.20200@deepcore.dk> <200606302214.59249.mistry.7@osu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2636364.BVkUFUGV5C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D atadev->param.current_heads; > > adp->sectors =3D atadev->param.current_sectors; > > adp->total_secs =3D (u_int32_t)atadev->param.current_size_1 > > | ((u_int32_t)atadev->param.current_size_2 << 16); } > > else { > > adp->heads =3D atadev->param.heads; > > adp->sectors =3D atadev->param.sectors; > > adp->total_secs =3D 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 =3D atadev->param.current_heads; > adp->sectors =3D atadev->param.current_sectors; > adp->total_secs =3D (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 =3D=3D 0 || > adp->sectors =3D=3D 0))) { > adp->heads =3D atadev->param.heads; > adp->sectors =3D atadev->param.sectors; > adp->total_secs =3D atadev->param.cylinders * adp->heads * > adp->sectors; > } Do you have an ETA on committing this fix? Or is there something=20 wrong with the change? Thanks, =2D-=20 Anish Mistry --nextPart2636364.BVkUFUGV5C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEtTVwxqA5ziudZT0RAqvmAJwPkO5bIBds39YhUmKPbxG4GjxLDwCcDssE JMe5D2jPfFJ+yvXwTFh2p6Y= =nH2q -----END PGP SIGNATURE----- --nextPart2636364.BVkUFUGV5C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607121346.24280.mistry.7>