From nobody@FreeBSD.org  Tue Jan 24 03:14:40 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 07C4616A424
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Jan 2006 03:14:40 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CECBC43D68
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Jan 2006 03:14:38 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0O3EbJC024345
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Jan 2006 03:14:37 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0O3EbA4024333;
	Tue, 24 Jan 2006 03:14:37 GMT
	(envelope-from nobody)
Message-Id: <200601240314.k0O3EbA4024333@www.freebsd.org>
Date: Tue, 24 Jan 2006 03:14:37 GMT
From: Arthur Hartwig <arthur.hartwig@nokia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Spurious "atapci1: failed to enable memory mapping!" message on startup
X-Send-Pr-Version: www-2.3

>Number:         92238
>Category:       kern
>Synopsis:       [ata] [patch] Spurious "atapci1: failed to enable memory mapping!" message on startup (ICH7)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 24 03:20:06 GMT 2006
>Closed-Date:    Thu Apr 28 18:00:12 UTC 2011
>Last-Modified:  Thu Apr 28 18:00:12 UTC 2011
>Originator:     Arthur Hartwig
>Release:        7.0-CURRENT
>Organization:
Nokia
>Environment:
FreeBSD oz-net-11.nes.nokia.com 7.0-CURRENT FreeBSD 7.0-CURRENT #10: Mon Jan 23 17:26:46 EST 2006     hartwig@oz-net-11.nes.nokia.com:/usr/src/sys/i386/compile/oz-net-11  i386

>Description:
I have a Gigabyte GA8I945P-G motherboard which has a ICH7 with chipid
0x27c08086.

On startup the system reports:
atapci1: <Intel ICH7 SATA300 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.2 on pci0
atapci1: failed to enable memory mapping!
ata0: <ATA channel 0> on atapci1
ata1: <ATA channel 1> on atapci1



>How-To-Repeat:
Reboot.
>Fix:
In dev/ata-ata-chipset.c function ata_intel_ident() the ids array has an
entry for chipid ATA_I82801GB_S1 (0x27c08086) with AHCI . The current
Intel I/O Controller Hub 7 (ICH7) Family Specification Update (file
30701409.pdf) says (page 16) the device with ID 27c0h is "Desktop Non-AHCI
and Non-RAID Mode".

I changed the ids array so the line for the ATA_I82801GB_S1 read:
     { ATA_I82801GB_S1, 0,    0, 0x00, ATA_SA300, "ICH7" },
rebuilt the kernel, rebooted and the "failed to enable memory mapping" message no longer appeared.


>Release-Note:
>Audit-Trail:

From: Arthur Hartwig <ahartwig@iprg.nokia.com>
To: bug-followup@FreeBSD.org, arthur.hartwig@nokia.com
Cc:  
Subject: Re: i386/92238: Spurious "atapci1: failed to enable memory mapping!"
 message on startup
Date: Tue, 24 Jan 2006 16:18:37 +1000

 The change proposed in the original problem report is insufficient; the 
 system failed to detect the CD drive at ata1-slave.
 
 The AHCI in the cfg1 field of the Intel ids array is unfortunately also 
 used in ata_intel_reset to indicate the channel may have a slave device.
 
 As well as the previously described patch to get rid of the memory 
 mapping failure message I changed ata_intel_reset(), the first test from
     if (ctlr->chip->cfg1) {
 to
     if (ctlr->chip->chipid >= ATA_I82801FB_S1) {
 (to cover both ICH6 and ICH7) and the new kernel recognised the CD drive.
 
 There are obviously a lot of combinations involving the ICHx series of 
 IDE controllers but the existing code doesn't seem to cope well with all 
 the possibilities. For example, in ata_intel_chipinit() there is no test 
 made to see if an AHCI capable chipset is in AHCI mode. The ICH7 
 specification suggests (section 12.1.33) the MAP register can be used to 
 see if an AHCI capable chipset is actually in AHCI mode.
 
 If you don't have access to an ICH7 board or want to test on additional 
 motherboards I'd be happy for you to send me diffs to try out revised code.
 
 
 
 
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Feb 21 21:42:02 UTC 2006 
Responsible-Changed-Why:  
This does not sound i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92238 
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: remko 
Responsible-Changed-When: Fri Jan 26 21:56:27 UTC 2007 
Responsible-Changed-Why:  
Hello Soren, can we have a look at this and try to resolve this? The 
first part seems OK to do, but the second part is something I do not 
understand (yet). Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92238 
Responsible-Changed-From-To: sos->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue May 12 04:35:00 UTC 2009 
Responsible-Changed-Why:  

sos@ is not actively working on ATA-related PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92238 
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: Thu Apr 28 17:55:19 UTC 2011 
State-Changed-Why:  
I believe this problem was fixed at SVN rev 214016 on 2010-10-18 and 
merged down to 8.2-RELEASE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92238 
>Unformatted:
