From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 14 05:10:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8F13106566B for ; Fri, 14 Mar 2008 05:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 91ED38FC14 for ; Fri, 14 Mar 2008 05:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2E5A1uN069993 for ; Fri, 14 Mar 2008 05:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2E5A1Y8069992; Fri, 14 Mar 2008 05:10:01 GMT (envelope-from gnats) Resent-Date: Fri, 14 Mar 2008 05:10:01 GMT Resent-Message-Id: <200803140510.m2E5A1Y8069992@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Adam Pordzik Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A229F106566C for ; Fri, 14 Mar 2008 05:06:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD5E8FC24 for ; Fri, 14 Mar 2008 05:06:57 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2E53cUP025582 for ; Fri, 14 Mar 2008 05:03:38 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m2E53cea025581; Fri, 14 Mar 2008 05:03:38 GMT (envelope-from nobody) Message-Id: <200803140503.m2E53cea025581@www.freebsd.org> Date: Fri, 14 Mar 2008 05:03:38 GMT From: Adam Pordzik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/121686: bogus CHS to LBA mapping in (at least) ata X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 05:10:01 -0000 >Number: 121686 >Category: kern >Synopsis: bogus CHS to LBA mapping in (at least) ata >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 14 05:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Adam Pordzik >Release: 7-release >Organization: >Environment: >Description: After attaching a 16GB Transcend CF Disk to an ALIX (pcengine.ch Geode) SBC several DMA timeouts occurred in dmesg before init starts: (boot -v) atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 15.2 on pci0 ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA66 cable=40 wire ad0: setting PIO4 on CS5536 chip ad0: DMA limited to UDMA33, device found non-ATA66 cable ad0: setting UDMA33 on CS5536 chip ad0: 15296MB at ata0-master UDMA33 >How-To-Repeat: >Fix: Make LBA-addressing independent from CHS? I would also be happy with some device.hints to override calculated cylinder count, where I can place static values. >Release-Note: >Audit-Trail: >Unformatted: >ad0: 31326208 sectors [33149C/15H/63S] 1 sectors/interrupt 1 depth queue ad0: DMA limited to UDMA33, device found non-ATA66 cable ad0: setting UDMA33 on CS5536 chip ad0: 15296MB at ata0-master UDMA33 ad0: setting UDMA33 on CS5536 chip ad0: TIMEOUT - READ_DMA retrying (1 retry left) LBA=31326207 ad0: setting UDMA33 on CS5536 chip ad0: TIMEOUT - READ_DMA retrying (0 retries left) LBA=31326207 ad0: setting UDMA33 on CS5536 chip ad0: FAILURE - READ_DMA timed out LBA=31326207 DMA in general is working, with PIO a get similar results. According to atacontrol, the CF Card have 31326208 sectors (verified), so FAILUE is at the last block. I assume GEOM looks here for a label. BIOS claims the CF has either a 1949/255/63 or 1023/240/63 mapping, The CF announces itself with 16383/15/63 and ata-disc calculates [33149C/15H/63S]. (sade, fdisk and sysinstall also use this values.) The product of latter c/h/s values is 31325805, which does not equal the physical 31326208. Actually I cannot access any sector beyond 31325804 with e.g. dd