Subject: Re: LBA48_THRESHOLD
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/15/2005 14:27:12
>> I note in wd.c: [...LBA48 stuff...]
>> (wd->sc_wdc_bio.blkno > LBA48_THRESHOLD ||
>> Wouldn't it make more sense for the > to be >=? ISTM the quirk
>> could go away then.
> No, because it could then break existing setups of drives supporting
> LBA48, but with 0x10000000 sectors (so which don't need LBA48),
> connected to controllers that don't handle LBA48.
I am inclined to doubt any such drives exist; manufacturers generally
go for round *decimal* numbers of bytes, which means they tend to avoid
round *binary* numbers of bytes.
Also, is it possible to report a size of 0x10000000 through LBA? I
would tend to doubt it, or the ST3200822A presumably would be doing it.
Or am I missing something else? (I readily admit there's a whole lot
here I do not really understand, so this is fairly likely.)
> However, instead of the quick, we could probably use the LBA sectors
> reported to decide when to switch to LBA48, instead of the quirk.
I'm not sure what you mean. You mean,
wd->sc-wdc_bio.blkno >= LBA-reported-size? Or you mean "if
LBA-reported-size is LBA48_THRESHOLD or higher" replacing the "if drive
claims LBA48" test?
The former actually sounds like a pretty good fix.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B