Subject: Re: two disks, two controlers, same bad block
To: None <tech-kern@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-kern
Date: 03/28/2006 09:41:59
On Mon, 27 Mar 2006, Manuel Bouyer wrote:
> > I know you're not stupid enough to not see a dozen trivial ways
> > to deal with that and still eliminate the damned "quirk" table
> > bogosity, so just do it.  Sheesh.
>
> I see none that doesn't use a match against the vendor
> string. Basically what we have now. All other ways I can see can cause
> problems. But if you have an idea that works, please share.

if (sector == whatever the magic number is) {
   if (disk is larger than magic size
       && controller can handle LBA48)
   {
       use LBA48;
   } else {
       use LBA32;
   }
}

Or do the equivalent tests at device attach time, and just test a flag
or jump through a function pointer or whatever at disk access time.

--apb (Alan Barrett)