From ga9@buffy.york.ac.uk  Sat May 13 20:16:50 2006
Return-Path: <ga9@buffy.york.ac.uk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 24FD316A415
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 20:16:50 +0000 (UTC)
	(envelope-from ga9@buffy.york.ac.uk)
Received: from mail-gw4.york.ac.uk (mail-gw4.york.ac.uk [144.32.128.249])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6968043D53
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 20:16:49 +0000 (GMT)
	(envelope-from ga9@buffy.york.ac.uk)
Received: from buffy.york.ac.uk (buffy-128.york.ac.uk [144.32.128.160])
	by mail-gw4.york.ac.uk (8.13.6/8.13.6) with ESMTP id k4DKGh0t000407
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 21:16:43 +0100 (BST)
Received: from buffy.york.ac.uk (localhost [127.0.0.1])
	by buffy.york.ac.uk (8.13.6/8.13.6) with ESMTP id k4DKGgQh017418
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 21:16:42 +0100 (BST)
	(envelope-from ga9@buffy.york.ac.uk)
Received: (from ga9@localhost)
	by buffy.york.ac.uk (8.13.6/8.13.6/Submit) id k4DKGgSN017417;
	Sat, 13 May 2006 21:16:42 +0100 (BST)
	(envelope-from ga9)
Message-Id: <200605132016.k4DKGgSN017417@buffy.york.ac.uk>
Date: Sat, 13 May 2006 21:16:42 +0100 (BST)
From: Gavin Atkinson <gavin@mod3.co.uk>
Reply-To: Gavin Atkinson <gavin@mod3.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] Support new ATA ICH7 controller
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         97228
>Category:       kern
>Synopsis:       [ata] [patch] Support new ATA ICH7 controller
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 13 20:20:22 GMT 2006
>Closed-Date:    Thu Feb 14 16:10:16 UTC 2008
>Last-Modified:  Thu Feb 14 16:10:16 UTC 2008
>Originator:     Gavin Atkinson
>Release:        FreeBSD 6.1-RC i386
>Organization:
http://www.mod3.co.uk/
>Environment:
System: FreeBSD buffy.york.ac.uk 6.1-RC FreeBSD 6.1-RC #8: Fri May 5 16:37:33 BST 2006 root@buffy.york.ac.uk:/usr/obj/usr/src/sys/BUFFY i386

>Description:
	My new Toshiba M5L laptop has an ATA controller which is unrecognised
(and is therefore used as a generic UDMA33 chip).  The attached patch adds
support for this.  In adding it as ATA_I82801GB_M, I have renamed the existing
#define of the same name from ATA_I82801GB_M to ATA_I82801GB_AHM (as the
associated PCI ID is the AHCI version of the chip I have according to
page 18 of http://download.intel.com/design/chipsets/specupdt/30701412.pdf )
>How-To-Repeat:
	N/A
>Fix:
	Patch is against HEAD

--- ata-82801M.diff begins here ---
Index: src/sys/dev/ata/ata-chipset.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/ata/ata-chipset.c,v
retrieving revision 1.162
diff -u -r1.162 ata-chipset.c
--- src/sys/dev/ata/ata-chipset.c	11 May 2006 10:43:08 -0000	1.162
+++ src/sys/dev/ata/ata-chipset.c	13 May 2006 19:33:36 -0000
@@ -1593,8 +1593,9 @@
      { ATA_I82801GB,    0,    0, 0x00, ATA_UDMA5, "ICH7" },
      { ATA_I82801GB_S1, 0, AHCI, 0x00, ATA_SA300, "ICH7" },
      { ATA_I82801GB_R1, 0, AHCI, 0x00, ATA_SA300, "ICH7" },
-     { ATA_I82801GB_M,  0, AHCI, 0x00, ATA_SA300, "ICH7" },
+     { ATA_I82801GB_M,  0,    0, 0x00, ATA_SA300, "ICH7" },
      { ATA_I82801GB_AH, 0, AHCI, 0x00, ATA_SA300, "ICH7" },
+     { ATA_I82801GB_AHM,0, AHCI, 0x00, ATA_SA300, "ICH7" },
      { ATA_I31244,      0,    0, 0x00, ATA_SA150, "31244" },
      { 0, 0, 0, 0, 0, 0}};
     char buffer[64]; 
Index: src/sys/dev/ata/ata-pci.h
===================================================================
RCS file: /usr/cvs/src/sys/dev/ata/ata-pci.h,v
retrieving revision 1.64
diff -u -r1.64 ata-pci.h
--- src/sys/dev/ata/ata-pci.h	13 Mar 2006 14:01:37 -0000	1.64
+++ src/sys/dev/ata/ata-pci.h	13 May 2006 19:33:36 -0000
@@ -152,7 +152,8 @@
 #define ATA_I82801GB_S1         0x27c08086
 #define ATA_I82801GB_R1         0x27c38086
 #define ATA_I82801GB_AH         0x27c18086
-#define ATA_I82801GB_M          0x27c58086
+#define ATA_I82801GB_M          0x27c48086
+#define ATA_I82801GB_AHM        0x27c58086
 #define ATA_I31244              0x32008086
 
 #define ATA_ITE_ID              0x1283
--- ata-82801M.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon May 15 04:14:09 UTC 2006 
Responsible-Changed-Why:  
Soeren should vet this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97228 

From: Maxim Sobolev <sobomax@sippysoft.com>
To: bug-followup@FreeBSD.org, gavin@mod3.co.uk
Cc:  
Subject: Re: kern/97228: [ata] [patch] Support new ATA ICH7 controller
Date: Mon, 15 May 2006 19:37:16 -0700

 MacBook doesn't work with your patch - FreeBSD detects controller but
 doesn't see any disks attached to it. :( Putting AHCI back solves the
 problem.
 
 I wonder if Intel has shipped two different controllers with the same
 pci ids.
 
 Just in the case, attached is appropriate entry from pciconf -lv output:
 
 atapci1@pci0: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
 
 And dmesg:
 
 atapci1: <Intel ICH7 SATA300 controller> port
 0x40d8-0x40df,0x40f4-0x40f7,0x40d0-0x40d7,0x40f0-0x40f3,0x4020-0x402f
 mem 0x98405000-0x984053ff irq 19 at device 31.2 on pci0
 ata2: <ATA channel 0> on atapci1
 ata3: <ATA channel 1> on atapci1
 ad5: 95396MB <Seagate ST910021AS 3.07> at ata2-slave SATA150
 
 -Maxim
State-Changed-From-To: open->closed 
State-Changed-By: gavin 
State-Changed-When: Thu Feb 14 16:08:14 UTC 2008 
State-Changed-Why:  
Close, this was patched in -HEAD (ata-chipset.c 1.169) and RELENG_6 
(1.126.2.13) a long time ago. 

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