Date: Mon, 3 Mar 2003 15:31:20 +0100 (CET) From: Joost Bekkers <joost@bps.jodocus.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Paul Toirkens <paul@toirkens.com> Subject: kern/48879: ATA disk size detected incorrectly (lba sector count not used on 30GB disk) Message-ID: <200303031431.h23EVKf32599@bps.jodocus.org>
next in thread | raw e-mail | index | archive | help
>Number: 48879 >Category: kern >Synopsis: ATA disk size detected incorrectly (lba sector count not used on 30GB disk) >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 03 06:40:03 PST 2003 >Closed-Date: >Last-Modified: >Originator: Joost Bekkers >Release: FreeBSD 4.7-RELEASE i386 >Organization: >Environment: System: FreeBSD sapphire.toirkens.com 4.7-RELEASE FreeBSD 4.7-RELEASE #2: Sun Mar 2 20:50:23 CET 2003 root@sapphire.toirkens.com:/usr/src/sys/compile/SAPPHIRE i386 partial dmesg: atapci0: <VIA 82C686 ATA100 controller> port 0xff00-0xff0f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 ahc0: <Adaptec 2940 Pro Ultra SCSI adapter> port 0xdc00-0xdcff mem 0xdffff000-0xdfffffff irq 10 at device 16.0 on pci0 aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs ad0: 29311MB <Maxtor 53073U6> [59554/16/63] at ata0-master UDMA66 acd0: CDROM <> at ata1-master PIO4 Waiting 15 seconds for SCSI devices to settle Mounting root from ufs:/dev/da0s1a da0 at ahc0 bus 0 target 0 lun 0 da0: <QUANTUM ATLAS IV 9 WLS 0909> Fixed Direct Access SCSI-3 device da0: 40.000MB/s transfers (20.000MHz, offset 8, 16bit), Tagged Queueing Enabled da0: 8761MB (17942584 512 byte sectors: 255H 63S/T 1116C) atacontrol cap 0 0: ATA channel 0, Master, device ad0: ATA/ATAPI revision 6 device model Maxtor 53073U6 serial number K60CHWNC firmware revision DAC10SC0 cylinders 4092 heads 16 sectors/track 63 lba supported 60030432 sectors lba48 not supported dma supported overlap not supported Feature Support Enable Value Vendor write cache yes yes read ahead yes yes dma queued no no 0/00 SMART yes yes microcode download yes yes security yes yes power management yes yes advanced power management yes no 0/00 automatic acoustic management yes no 254/FE 192/C0 >Description: 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)? >How-To-Repeat: >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. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303031431.h23EVKf32599>