From owner-freebsd-current@FreeBSD.ORG Mon Apr 19 06:30:33 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 DA0A2106564A; Mon, 19 Apr 2010 06:30:33 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 7641D8FC0C; Mon, 19 Apr 2010 06:30:32 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e12so1661157fga.13 for ; Sun, 18 Apr 2010 23:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=FRMjIlZWU+P5cxtdGVBct+Tweqe8SS4fhpZPBoCWGdY=; b=Kva64ibDAii4SPHXnGz/RtWLb3Hg4VIbc+Yf8I63fDKgIwBk/IpW9Xu9w5S+1xQYr+ 5NXA8lY+Jj/TAnj0Q+k7pOM8SPlf6ubec0StGDHCg8bPiOBObpwTeBKqn15TnFM1f1WY Wq6o8vvsHxejqW7aAV3RBo2HIaiRQXOs0Pdkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=bGvhhR5pX4NM+xB/50QwDQ5Xbh09AhLxnCz9VHIAZiepw1F/1ldjLH3eLJ+XxQavIe aaazVeOVNmO/+kR2z7ZEoKKFNPQ96Uby3JhHI0bu1Bi9sefg43haVG9JbSCtN2QQAOXF Kt3jG4lNJjV/+gCLOn6AtMTN3y3ojWMMWuSa4= Received: by 10.223.63.17 with SMTP id z17mr2408461fah.66.1271658631376; Sun, 18 Apr 2010 23:30:31 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm9731190fks.30.2010.04.18.23.30.30 (version=SSLv3 cipher=RC4-MD5); Sun, 18 Apr 2010 23:30:31 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BCBF87C.7020400@FreeBSD.org> Date: Mon, 19 Apr 2010 09:30:20 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Rui Paulo References: <4BCA325A.1060600@protected-networks.net> <4BCA9F44.50002@FreeBSD.org> <987831E7-4893-4F2F-B96F-A1E25BD9BCA0@freebsd.org> <4BCB03AA.1050405@FreeBSD.org> <9B82ED79-C168-482C-A3A9-26D71060BB0F@freebsd.org> In-Reply-To: <9B82ED79-C168-482C-A3A9-26D71060BB0F@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD-Current , Michael Butler Subject: Re: SVN rev 206755 breakage 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: Mon, 19 Apr 2010 06:30:34 -0000 Rui Paulo wrote: > On 18 Apr 2010, at 14:05, Alexander Motin wrote: >> Most of AHCI controllers could also work as usual PCI ATA, but not every >> PCI ATA could work as AHCI. It would be nice to compare `pciconf -lvbc` >> output in both working (Rui) and not working (Michael) cases. > > ahci0@pci0:0:31:2: class=0x01018f card=0x72708086 chip=0x27c48086 rev=0x02 hdr=0x00 > vendor = 'Intel Corporation' > device = '82801GBM/GHM (ICH7-M Family) Serial ATA Storage Controller' > class = mass storage > subclass = ATA ^^^ It doesn't report itself as AHCI. > bar [10] = type I/O Port, range 32, base 0x20d8, size 8, enabled > bar [14] = type I/O Port, range 32, base 0x20fc, size 4, enabled > bar [18] = type I/O Port, range 32, base 0x20d0, size 8, enabled > bar [1c] = type I/O Port, range 32, base 0x20f8, size 4, enabled > bar [20] = type I/O Port, range 32, base 0x2020, size 16, enabled > bar [24] = type Memory, range 32, base 0x90445000, size 1024, enabled This resource (BAR(5)) is absent on Michael's system. It is needed to work in AHCI mode, but not required for legacy PCI ATA. Probably some kind of BIOS magic in your case makes it appear in this mode with this chip ID. On ICH8 and above in non-AHCI mode BAR(5) is also present, but with different meaning (access to some SATA registers). So it may be difficult to distinguish what exactly we have there. > cap 01[70] = powerspec 2 supports D0 D3 current D0 > > BTW, Mac OS X also uses AHCI on this controller. I think Mac OS X is very special beast, which could easily be tuned for their specific hardware. So I think either your patch should be either reverted, or somehow improved to check presence of BAR(5) and may be something else on probe stage, but IMHO it's a kind of magic and I wouldn't be doing so. -- Alexander Motin