Bug 48879

Summary: ATA disk size detected incorrectly (lba sector count not used on 30GB disk)
Product: Base System Reporter: Joost Bekkers <joost>
Component: kernAssignee: Søren Schmidt <sos>
Status: Closed FIXED    
Severity: Affects Only Me CC: paul
Priority: Normal    
Version: 4.7-RELEASE   
Hardware: Any   
OS: Any   

Description Joost Bekkers 2003-03-03 14:40:03 UTC
ATA disk reports 4092 cylinders so lba sector count isn't used.
This results in a 2GB disk being detected instead of the full 30GB

from ata-disk.c:
    /* use the 28bit LBA size if valid */
    if (atadev->param->cylinders == 16383 &&
        adp->total_secs < atadev->param->lba_size)
        adp->total_secs = atadev->param->lba_size;

So only if the reported numbers of cylinders os 16383 the lba size is taken into account,
should we check for lba-support (bit 9, word 49 of 'identify device' information)?

Fix: 

My guess at a fix would be to replace line 135 of ata-disk.c (1.60.2.23)

  if (atadev->param->cylinders == 16383 &&

with

  if (atadev->param->support_lba &&

but I haven't been able to test this.
Comment 1 dwmalone freebsd_committer freebsd_triage 2003-03-04 22:07:22 UTC
Responsible Changed
From-To: freebsd-bugs->sos

ATA PR for Soren.
Comment 2 Søren Schmidt freebsd_committer freebsd_triage 2003-04-28 19:22:43 UTC
State Changed
From-To: open->closed

The geometry from the disk is bogus, mayhaps a sizelimitting 
jumper is left on it ?