From owner-cvs-all@FreeBSD.ORG Fri Aug 15 16:29:55 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25912106568A; Fri, 15 Aug 2008 16:29:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id A405D8FC0C; Fri, 15 Aug 2008 16:29:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c220-239-252-11.carlnfd3.nsw.optusnet.com.au (c220-239-252-11.carlnfd3.nsw.optusnet.com.au [220.239.252.11]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m7FGTi3e003258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 16 Aug 2008 02:29:45 +1000 Date: Sat, 16 Aug 2008 02:29:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: ticso@cicely.de In-Reply-To: <20080815114704.GF34094@cicely7.cicely.de> Message-ID: <20080816020102.Q99153@delplex.bde.org> References: <200808151055.m7FAtTqT064094@repoman.freebsd.org> <20080815114704.GF34094@cicely7.cicely.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Philip Paeps Subject: Re: cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-chipset.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2008 16:29:55 -0000 On Fri, 15 Aug 2008, Bernd Walter wrote: > On Fri, Aug 15, 2008 at 10:55:11AM +0000, Philip Paeps wrote: >> philip 2008-08-15 10:55:11 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/dev/ata ata-all.c ata-all.h ata-chipset.c >> Log: >> SVN rev 181753 on 2008-08-15 10:55:11Z by philip >> >> Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting to 1. >> This can be used to disable the 80pin cable check on systems which forget to >> set the bit -- such as certain laptops and Soekris boards. This should be a sysctl so that it can be set at useful times (after booting, not before). Also, the sysctls for setting the mode shouldn't be subject to the cable check. Range checking in sysctls is a bug since it mainly prevents you setting known working values. > Are those bits per device? > Because I see the following for a onboard controller: > [...] > ACPI APIC Table: > [...] > atapci0: port 0x2018-0x201f,0x2024-0x2027,0x2010-0x2017,0x2020-0x2023,0x2000-0x200f mem 0xe0100000-0xe01001ff irq 17 at device 0.0 on pci2 > atapci0: [ITHREAD] > ata2: on atapci0 > ata2: [ITHREAD] > [...] > ad4: DMA limited to UDMA33, device found non-ATA66 cable > ad4: 117246MB at ata2-master UDMA33 > ad5: 156334MB at ata2-slave UDMA133 > Which is strange, since both drives are on the same cable... I get this on an oldish VIA motherboard (Gigabyte K8 Triton) which didn't have the problem until changes in early April 2008. The bug seems to be a subtle timing one -- - the bug sometimes didn't show up when I paused ata initialization using ddb, but adding long delays at similar places to the debugging pauses didn't seem to work - the changes in early April 2008 are large but don't seem to go near either cable checking or timing. % atapci0@pci0:15:0: class=0x01018a card=0x50021458 chip=0x05711106 rev=0x06 hdr=0x00 % vendor = 'VIA Technologies Inc' % device = 'VT82xxxx EIDE Controller (All VIA Chipsets)' % class = mass storage % subclass = ATA After downgrading to a new kernel: Jul 30 23:22:00 besplex kernel: FreeBSD 8.0-CURRENT #545: Tue Jul 29 14:29:22 UTC 2008 % Jul 30 23:22:00 besplex kernel: ad0: DMA limited to UDMA33, device found non-ATA66 cable % Jul 30 23:22:00 besplex kernel: ad0: 29313MB at ata0-master UDMA33 % Jul 30 23:22:00 besplex kernel: ad1: 58644MB at ata0-slave UDMA100 % Jul 30 23:22:00 besplex kernel: ad2: DMA limited to UDMA33, device found non-ATA66 cable % Jul 30 23:22:00 besplex kernel: ad2: 58644MB at ata1-master UDMA33 % Jul 30 23:22:00 besplex kernel: acd0: DVDROM at ata1-slave UDMA33 The cable check always works correctly for ad1 (slave to ad0 master) but very rarely works correctly for ad0 or ad2 (both masters). After upgrading to an old kernel: Aug 13 21:55:52 besplex kernel: FreeBSD 8.0-CURRENT #502: Fri Apr 4 17:09:31 UTC 2008 % Jul 31 00:58:45 besplex kernel: ad0: 29313MB at ata0-master UDMA100 % Jul 31 00:58:45 besplex kernel: ad1: 58644MB at ata0-slave UDMA100 % Jul 31 00:58:45 besplex kernel: ad2: 58644MB at ata1-master UDMA100 % Jul 31 00:58:45 besplex kernel: acd0: DVDROM at ata1-slave UDMA33 For kernels built up to and including 4 April 2008 17:09:31 UTC, the cable check always worked correctly for ad0, ad1 and ad2. Bruce