From owner-freebsd-bugs@FreeBSD.ORG Sun Nov 9 21:40:08 2003 Return-Path: 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 C78C616A4CE for ; Sun, 9 Nov 2003 21:40:08 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38CDD43FA3 for ; Sun, 9 Nov 2003 21:40:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hAA5e7FY091395 for ; Sun, 9 Nov 2003 21:40:07 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hAA5e7ZA091393; Sun, 9 Nov 2003 21:40:07 -0800 (PST) (envelope-from gnats) Resent-Date: Sun, 9 Nov 2003 21:40:07 -0800 (PST) Resent-Message-Id: <200311100540.hAA5e7ZA091393@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, "Greg 'groggy' Lehey" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7291816A4CE for ; Sun, 9 Nov 2003 21:37:28 -0800 (PST) Received: from blackwater.lemis.com (sat-gw2.lemis.com [192.109.197.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A71643FB1 for ; Sun, 9 Nov 2003 21:37:25 -0800 (PST) (envelope-from grog@blackwater.lemis.com) Received: from blackwater.lemis.com (localhost [127.0.0.1]) hAA5bu63009503 for ; Mon, 10 Nov 2003 16:07:56 +1030 (CST) (envelope-from grog@blackwater.lemis.com) Received: (from grog@localhost) by blackwater.lemis.com (8.12.10/8.12.10/Submit) id hAA5btWH009502; Mon, 10 Nov 2003 16:07:55 +1030 (CST) (envelope-from grog) Message-Id: <200311100537.hAA5btWH009502@blackwater.lemis.com> Date: Mon, 10 Nov 2003 16:07:55 +1030 (CST) From: "Greg 'groggy' Lehey" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/59103: Serious data corruiption reading compact flash IDE drives X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Greg 'groggy' Lehey List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2003 05:40:09 -0000 >Number: 59103 >Category: kern >Synopsis: Serious data corruiption reading compact flash IDE drives >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 09 21:40:06 PST 2003 >Closed-Date: >Last-Modified: >Originator: Greg 'groggy' Lehey >Release: FreeBSD 5.1-CURRENT i386 >Organization: LEMIS (SA) Pty Ltd >Environment: System: FreeBSD wantadilla.lemis.com 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sat Oct 26 11:16:38 CST 2002 grog@current.lemis.com:/usr/obj/src/FreeBSD/5-CURRENT-WANTADILLA/src/sys/WANTADILLA i386 FreeBSD sydney.worldwide.lemis.com 5.1-CURRENT FreeBSD 5.1-CURRENT #2: Thu Oct 9 18:20:30 CST 2003 grog@sydney.worldwide.lemis.com:/home/obj/src/FreeBSD/5-CURRENT-KONDOPARINGA/src/sys/KONDOPARINGA i386 >Description: It is no longer possible to read CF cards with FAT file systems (digital camera data) with -CURRENT. This situation has persisted for well over a month. I have given this PR the category critical/high because of the data corruption and the fact that it occurs in what is to become a part of the base kernel. Ideally, the change to this implementatino should not have occurred until such bugs were ironed out. >How-To-Repeat: Mount a compact flash card on a -CURRENT machine: ad4: FAILURE - SETFEATURES status=51 error=4 ad4: FAILURE - SETFEATURES status=51 error=4 GEOM: create disk ad4 dp=0xc217d070 ad4: 46MB <> [185/16/32] at ata2-master PIO2 # mount -t msdos /dev/ad4s1 /camera Mounting root from ufs:/dev/ad0s3a # xv The file will be corrupt. The same hardware, running under 4.6-RELEASE, does not report the failures above: ata4 at port 0x240-0x247,0x24e irq 11 slot 0 on pccard0 ad8: 46MB <> [185/16/32] at ata4-master BIOSPIO After copying the file to disk, the EOF is the same, but the contents are different (and correct in this case): $ cmp dscn2621.jpg dscn2621-corrupt.jpg dscn2621.jpg dscn2621-corrupt.jpg differ: char 7681, line 30 The data comes back in sync at offset 8192, suggesting that the data is not being transferred for the full length. >Fix: >Release-Note: >Audit-Trail: >Unformatted: