From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 27 21:50:08 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 E9CB8106567A for ; Fri, 27 Jan 2012 21:50:07 +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 C8DD18FC15 for ; Fri, 27 Jan 2012 21:50:07 +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 q0RLo79B093482 for ; Fri, 27 Jan 2012 21:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0RLo7e6093481; Fri, 27 Jan 2012 21:50:07 GMT (envelope-from gnats) Date: Fri, 27 Jan 2012 21:50:07 GMT Message-Id: <201201272150.q0RLo7e6093481@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, 27 Jan 2012 21:50:08 -0000 The following reply was made to PR sparc64/164226; it has been noted by GNATS. From: Marius Strobl To: Alexander Motin 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, 27 Jan 2012 22:47:04 +0100 On Sat, Jan 21, 2012 at 01:59:19AM +0100, Marius Strobl wrote: > On Fri, Jan 20, 2012 at 08:50:05PM +0100, Marius Strobl wrote: > > On Fri, Jan 20, 2012 at 09:40:35PM +0200, Alexander Motin wrote: > > > On 01/20/12 21:32, Marius Strobl wrote: > > > >On Fri, Jan 20, 2012 at 08:13:38PM +0200, Alexander Motin wrote: > > > >>On 20.01.2012 19:51, Marius Strobl wrote: > > > >>>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? > > > >> > > > >>hw.ata.ata_dma and hw.ata.atapi_dma are indeed no longer exist. But > > > >>hint.ata.X.mode and hint.ata.X.devX.mode are working. In run tame it can > > > >>be done via `camcontrol negotiate cd0 -U -M mode; camcontrol rescan X`, > > > >>where X is a CAM bus number. > > > >> > > > >>hw.ata.ata_dma_check_80pin still exist, but CAM ATA transport is no > > > >>longer look on whet device thinks about cable type. It is tricky in SATA > > > >>world. Cable type is checked only from controller driver side now. Looks > > > >>like none of mentioned controller drivers are doing it. > > > >> > > > >>hw.ata.wc was replaced by kern.cam.ada.write_cache and > > > >>kern.cam.ada.X.write_cache. > > > >> > > > >>I would start experiments from limiting transfer speed manually. > > > > > > > >Hrm, limitting the mode to PIO avoids the data corruption with > > > >ATA_CAM. > > > > > > What's about limiting speed to UDMA33? Is it DMA problem or result of > > > dropped device side cable detection that could limit to UDMA33 before? > > > > > > > Apparently it's some sort of DMA problem. UDMA2 is also the maximum > > negotiated with acd(4). Limitting to UDMA1, UDMA0 or even WDMA0 > > makes no differnce to the problem. > > ... for the ALi M5229 rev. 0xc4 that is. The CMD 646 is limited to > WDMA2 in the firstplace, a user also reported data corruption with > these though. > I can also confirm the problem with CMD 646 but it turns out there's no problem when using the PATA port of an add-on VT6421A with otherwise identical hardware. So the data corruption apparently isn't due to a 64-bit or endianness bug in the ATA_CAM code (besides looking fine in this regard). At least for ata_aceride(4) I've also double-checked the generic initialization and the mode setting but can't spot any issue there. Does ATA_CAM+cd(4) do anything fundamentally different than acd(4)? Marius