From owner-freebsd-current@FreeBSD.ORG Fri Jan 29 19:51:44 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 976841065672; Fri, 29 Jan 2010 19:51:44 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2113B8FC0C; Fri, 29 Jan 2010 19:51:43 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 3606F1E0076C; Fri, 29 Jan 2010 20:51:42 +0100 (CET) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.3/8.14.3) with ESMTP id o0TJnD2o013982; Fri, 29 Jan 2010 20:49:13 +0100 (CET) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.3/8.14.3/Submit) id o0TJnCAa013981; Fri, 29 Jan 2010 20:49:12 +0100 (CET) (envelope-from nox) Date: Fri, 29 Jan 2010 20:49:12 +0100 (CET) From: Juergen Lock Message-Id: <201001291949.o0TJnCAa013981@triton8.kn-bremen.de> To: mav@FreeBSD.org X-Newsgroups: local.list.freebsd.current In-Reply-To: <4B62F2B0.2030704@FreeBSD.org> References: <4B55D9D4.1000008@FreeBSD.org> <4B61C688.2050609@FreeBSD.org> <4B61CCB6.4040005@FreeBSD.org> <4B62C97F.7080000@FreeBSD.org> <4B62EDFB.1060103@icyb.net.ua> Organization: home Cc: freebsd-current@FreeBSD.org, Andriy Gapon , Yamagi Burmeister Subject: Re: Pack of CAM improvements X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 19:51:44 -0000 In article <4B62F2B0.2030704@FreeBSD.org> you write: >Andriy Gapon wrote: >> on 29/01/2010 13:41 Alexander Motin said the following: >>> Yamagi Burmeister wrote: >>>> On Thu, 28 Jan 2010, Alexander Motin wrote: >>>> >>>>>>> Yamagi Burmeister wrote: >>>>>>>> ahcich0: is 00000002 cs 00000000 ss 00000000 rs 00000001 tfd 50 serr >>>>>>>> 00000000 >>>>>>>> ahcich0: Timeout on slot 0 >>>>>>> Try to disable MSI interrupts with `hint.ahci.0.msi=0`. >>>>>> That fixed the problem. Thank you :) >>>>> That's quite strange, as in many other cases IXP700 is working fine. >>>>> Different revisions? What is your `pciconf -lvbc` reports? >>>> When I helped nox@ debugging a problem with timeouts we noticed, that >>>> our controlers are of differend revisions. The pciconf output ist: >>>> >>>> ahci0@pci0:0:17:0: class=0x010601 card=0x43911002 chip=0x43911002 >>>> rev=0x00 hdr=0x00 >>>> vendor = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.' >>>> device = 'SB700 SATA Controller [AHCI mode]' >>>> class = mass storage >>>> subclass = SATA >>>> bar [10] = type I/O Port, range 32, base 0xd000, size 8, enabled >>>> bar [14] = type I/O Port, range 32, base 0xc000, size 4, enabled >>>> bar [18] = type I/O Port, range 32, base 0xb000, size 8, enabled >>>> bar [1c] = type I/O Port, range 32, base 0xa000, size 4, enabled >>>> bar [20] = type I/O Port, range 32, base 0x9000, size 16, enabled >>>> bar [24] = type Memory, range 32, base 0xfe8ff800, size 1024, >>>> enabled >>>> cap 01[60] = powerspec 2 supports D0 D3 current D0 >>>> cap 05[50] = MSI supports 4 messages, 64 bit >>>> cap 12[70] = SATA Index-Data Pair >>> What's interesting, is that Asus board with the same chipset doesn't >>> expose MSI support at all: >>> >>> ahci0@pci0:0:17:0: class=0x010601 card=0x43911002 chip=0x43911002 >>> rev=0x00 hdr=0x00 >>> vendor = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.' >>> device = 'SB700 SATA Controller [AHCI mode]' >>> class = mass storage >>> subclass = SATA >>> bar [10] = type I/O Port, range 32, base 0xc000, size 8, enabled >>> bar [14] = type I/O Port, range 32, base 0xb000, size 4, enabled >>> bar [18] = type I/O Port, range 32, base 0xa000, size 8, enabled >>> bar [1c] = type I/O Port, range 32, base 0x9000, size 4, enabled >>> bar [20] = type I/O Port, range 32, base 0x8000, size 16, enabled >>> bar [24] = type Memory, range 32, base 0xfbcffc00, size 1024, enabled >>> cap 01[60] = powerspec 2 supports D0 D3 current D0 >>> cap 12[70] = SATA Index-Data Pair >>> >> >> PCI revision register of SMBus device (0:20:0) gives a particular revision of SB7x0. >> SB700 RPR document (section 7.11) says that MSI capability should be disabled if >> the revision is 0x39 or 0x3a, it should be enabled for newer revisions (0x3b, 03c). > >VIA uses ISA bridge to identify chipset, ATI (as you said) - SMBus. >Hell! Why not to do it properly? > >> Those who like to experiment with potentially dangerous things may try playing >> with bit 16 of PCI config register 0x50 of SATA controller device. > >I would prefer it was done by BIOS. Probably ASUS did it, as my board >has 0x3a. Ok while we are talking about ahci(4) on IXP700... Can anyone reproduce the `test unit ready' bug on one of those? Since I saw no reply to my post, http://docs.freebsd.org/cgi/mid.cgi?201001231407.o0NE7l8j002620 maybe the bug is controller-specific? How to reproduce: just try camcontrol tur adaX or cdrecord -scanbus or (at least I think this is the same issue) start xfburn without hal running, then watch for the bus to hang at the next disk access. (Also leaving the disk led on solid here.) With the previous patch, http://people.freebsd.org/~mav/cam-ata.20100119.patch (haven't tested the latest one yet) at least it now seems to recover after some timeout, leaving this in dmesg: (sorry I didn't notice when I first tried, guess I didn't wait long enough...) ahcich2: Timeout on slot 20 ahcich2: is 04000000 cs 00100000 ss 00100000 rs 00100000 tfd 451 serr 00400000 ahcich2: AHCI reset... ahcich2: hardware reset ... ahcich2: SATA connect time=0ms status=00000123 ahcich2: ready wait time=11ms ahcich2: AHCI reset done: device found (ada1:ahcich2:0:0:0): Command timed out (ada1:ahcich2:0:0:0): Retrying Command And pciconf here looks like this: ahci0@pci0:0:17:0: class=0x010601 card=0xb0021458 chip=0x43911002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.' device = 'SB700 SATA Controller [AHCI mode]' class = mass storage subclass = SATA bar [10] = type I/O Port, range 32, base 0xff00, size 8, enabled bar [14] = type I/O Port, range 32, base 0xfe00, size 4, enabled bar [18] = type I/O Port, range 32, base 0xfd00, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xfc00, size 4, enabled bar [20] = type I/O Port, range 32, base 0xfb00, size 16, enabled bar [24] = type Memory, range 32, base 0xfe02f000, size 1024, enabled Thanx, Juergen