From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 20 18:20:14 2012 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBCF9106564A for ; Fri, 20 Jan 2012 18:20:13 +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 CC0078FC0A for ; Fri, 20 Jan 2012 18:20:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0KIKDNH054438 for ; Fri, 20 Jan 2012 18:20:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0KIKDsi054437; Fri, 20 Jan 2012 18:20:13 GMT (envelope-from gnats) Date: Fri, 20 Jan 2012 18:20:13 GMT Message-Id: <201201201820.q0KIKDsi054437@freefall.freebsd.org> To: freebsd-sparc64@FreeBSD.org From: Marius Strobl Cc: Subject: Re: sparc64/164226: Data corruption on 9.0-RELEASE when reading from CDROM X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marius Strobl List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 18:20:14 -0000 The following reply was made to PR sparc64/164226; it has been noted by GNATS. From: Marius Strobl To: mav@freebsd.org Cc: freebsd-gnats-submit@freebsd.org, "C. P. Ghost" Subject: Re: sparc64/164226: Data corruption on 9.0-RELEASE when reading from CDROM Date: Fri, 20 Jan 2012 18:51:06 +0100 On Tue, Jan 17, 2012 at 12:31:43AM +0000, C. P. Ghost wrote: > > >Number: 164226 > >Category: sparc64 > >Synopsis: Data corruption on 9.0-RELEASE when reading from CDROM > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-sparc64 > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Tue Jan 17 00:40:07 UTC 2012 > >Closed-Date: > >Last-Modified: > >Originator: C. P. Ghost > >Release: FreeBSD 9.0-RELEASE/sparc64 > >Organization: > Cordula's Web > >Environment: > FreeBSD tarazed.cordula.ws 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Mon Jan 16 01:51:15 CET 2012 root@tarazed.cordula.ws:/usr/obj/usr/src/sys/GENERIC sparc64 > >Description: > It's not possible to install FreeBSD 9.0-RELEASE from CDROM on > a Blade 1500, because bsdinstall reports a corrupt base.txz. > > Investigating the issue further, revealed that the 9.0 kernel > corrupts data read from a CDROM mounted via /dev/cd0, while > the 8.2 kernel doesn't corrupt data when the CDROM is mounted > via /dev/acd0. > > >How-To-Repeat: > 8.2-RELEASE doesn't exhibit the bug: > > 1. Install 8.2-RELEASE on a sun4u system. > 2. Mount the 9.0-RELEASE CDROM (using /dev/acd0) > 3. cd /cdrom/usr/freebsd-dist; sha256 *.txz; > 4. compare with MANIFEST -> same checksums. > > Upgrade to 9.0-RELEASE, e.g. from source: > > 4. mv /usr/src /usr/src.82 > 5. cd /; tar -xvpf /cdrom/usr/freebsd-dist/src.txz > 6. source upgrade from 8.2 to 9.0 > > 9.0-RELEASE exhibits the problem: > > 7. Reboot to 9.0-RELEASE > 8. Mount the 9.0-RELEASE CDROM (using /dev/cd0) > 9. cd /cdrom/usr/freebsd-dist; sha256 *.txz > 10. compare checksums with MANIFEST -> different checksums! > > Reboot 9.0 userland to 8.2 (/boot/kernel.old/kernel) > and repeat sha256 checksums -> no errors. > > Note, the sha256 program on 9.0 yields the same checksums > on arbitrary files than on 8.2, as long as those files are > not read from CDROM (e.g. fetched from the net). It is okay. > >Fix: > No fix known yet. > > Workaround: netboot 9.0, or source-upgrade from a previous > release. Don't use CDROM (/dev/cd0) on 9.0 until this bug > is fixed. > Alexander, could you please look into this? Apparently, using cd(4) with ATA_CAM on sparc64 causes seemingly random data corruption while using the same hardware with acd(4) doesn't. Also cd(4) works just fine with SPI CD-ROMs. This affects CD-ROMs connected to both AcerLabs M5229 and CMD 646. Btw., apparently hw.ata.ata_dma and w.ata.atapi_dma no longer work when using ATA_CAM as ata_getparam() isn't called in the first place. On a quick glance hw.ata.ata_dma_check_80pin and hw.ata.wc probably also are no longer available with ATA_CAM. Is there an alternative to these tunables to achieve the same when using ATA_CAM? Marius