Fix the problem that some (in my book broken) disks reports

to be able to use 48bit addressing mode, but says the 48bit
size of the disk is 0, which according to spec means it can
address zero sectors in 48bit mode, why then say it supports
48bit mode at all..
This commit is contained in:
Søren Schmidt 2002-02-18 11:52:51 +00:00
parent f8fc629c0f
commit dc9395ae1f

View File

@ -137,7 +137,8 @@ ad_attach(struct ata_device *atadev)
adp->total_secs = atadev->param->lba_size;
/* use the 48bit LBA size if valid */
if (atadev->param->support.address48)
if (atadev->param->support.address48 &&
atadev->param->lba_size48 > 268435455)
adp->total_secs = atadev->param->lba_size48;
/* use multiple sectors/interrupt if device supports it */