From owner-freebsd-bugs Mon Mar 3 6:40: 8 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E872537B401 for ; Mon, 3 Mar 2003 06:40:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DCB243FBD for ; Mon, 3 Mar 2003 06:40:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h23Ee3NS048722 for ; Mon, 3 Mar 2003 06:40:03 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h23Ee32V048721; Mon, 3 Mar 2003 06:40:03 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7385237B401 for ; Mon, 3 Mar 2003 06:31:23 -0800 (PST) Received: from bps.jodocus.org (c115139.upc-c.chello.nl [212.187.115.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id D45CE43FDF for ; Mon, 3 Mar 2003 06:31:21 -0800 (PST) (envelope-from joost@bps.jodocus.org) Received: (from joost@localhost) by bps.jodocus.org (8.11.6/8.11.6) id h23EVKf32599; Mon, 3 Mar 2003 15:31:20 +0100 (CET) (envelope-from joost) Message-Id: <200303031431.h23EVKf32599@bps.jodocus.org> Date: Mon, 3 Mar 2003 15:31:20 +0100 (CET) From: Joost Bekkers Reply-To: Joost Bekkers To: FreeBSD-gnats-submit@FreeBSD.org Cc: Paul Toirkens X-Send-Pr-Version: 3.113 Subject: kern/48879: ATA disk size detected incorrectly (lba sector count not used on 30GB disk) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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: port 0xff00-0xff0f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 ahc0: 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 [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: 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