From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 2 23:40:06 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D07B16A4CE for ; Thu, 2 Sep 2004 23:40:06 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4447643D41 for ; Thu, 2 Sep 2004 23:40:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i82Ne6WS011842 for ; Thu, 2 Sep 2004 23:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i82Ne6FY011841; Thu, 2 Sep 2004 23:40:06 GMT (envelope-from gnats) Resent-Date: Thu, 2 Sep 2004 23:40:06 GMT Resent-Message-Id: <200409022340.i82Ne6FY011841@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy Messenger Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14F8A16A4CE; Thu, 2 Sep 2004 23:37:16 +0000 (GMT) Received: from ns1.mezzweb.com (ip68-103-32-140.ks.ok.cox.net [68.103.32.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FE3B43D46; Thu, 2 Sep 2004 23:37:10 +0000 (GMT) (envelope-from mezz@ns1.mezzweb.com) Received: from ns1.mezzweb.com (localhost [127.0.0.1]) by ns1.mezzweb.com (8.12.11/8.12.11) with ESMTP id i82N5kRv000977; Thu, 2 Sep 2004 18:05:46 -0500 (CDT) (envelope-from mezz@ns1.mezzweb.com) Received: (from mezz@localhost) by ns1.mezzweb.com (8.12.11/8.12.11/Submit) id i82N5jT7000976; Thu, 2 Sep 2004 18:05:45 -0500 (CDT) (envelope-from mezz) Message-Id: <200409022305.i82N5jT7000976@ns1.mezzweb.com> Date: Thu, 2 Sep 2004 18:05:45 -0500 (CDT) From: Jeremy Messenger To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: sos@FreeBSD.org Subject: kern/71321: [PATCH] Add nForce2 ata support for MSI K7N2 Delta2 Platinum X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jeremy Messenger List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2004 23:40:06 -0000 >Number: 71321 >Category: kern >Synopsis: [PATCH] Add nForce2 ata support for MSI K7N2 Delta2 Platinum >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Sep 02 23:40:05 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Mezz >Release: FreeBSD 5.2-CURRENT i386 >Organization: >Environment: System: FreeBSD ns1.mezzweb.com 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue Mar 30 01:17:23 CST 2004 mezz@mezz.mezzweb.com:/usr/src/sys/i386/compile/BSDROCKS i386 Don't mind above; I have tested this patch on my another machine that has nForce2 with FreeBSD 5.3-BETA2. >Description: Add nForce2 ata support for MSI K7N2 Delta2 Platinum (MS-6570E-010). http://www.msicomputer.com/product/p_spec.asp?model=K7N2_Delta2_Platinum&class=mb - Ultra DMA 66/100/133 master mode PCI EIDE controller - Two IDE controller on the nVIDIAŽ nForce2 Gigabit MCP chipset provides IDE HDD/CDROM with PIO, Bus Master and Ultra DMA133/100/66 operation modes - Can connect up to four IDE devices pciconf: =========================================== atapci0@pci0:9:0: class=0x01018a card=0x57001462 chip=0x008510de rev=0xa3 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'MCP2S Parallel ATA Controller' class = mass storage subclass = ATA =========================================== Before dmesg: =========================================== atapci0: port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 9.0 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 ad0: 114473MB [232581/16/63] at ata0-master UDMA33 ATAPI_RESET time = 150us acd0: CDRW at ata1-master UDMA33 Mounting root from ufs:/dev/ad0s1a =========================================== After dmesg: =========================================== atapci0: port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 9.0 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 ad0: 114473MB [232581/16/63] at ata0-master UDMA100 ATAPI_RESET time = 170us ata1-master: DMA limited to UDMA33, non-ATA66 cable or device acd0: CDRW at ata1-master UDMA33 Mounting root from ufs:/dev/ad0s1a =========================================== Before 'atacontrol mode N': =========================================== # atacontrol mode 0 Master = UDMA33 Slave = BIOSPIO # atacontrol mode 1 Master = UDMA33 Slave = BIOSPIO =========================================== After 'atacontrol mode N': =========================================== # atacontrol mode 0 Master = UDMA100 Slave = BIOSPIO # atacontrol mode 1 Master = UDMA33 <-- It's correct, cable is 33 and I need to buy a new one. Slave = BIOSPIO =========================================== If there is anything else you need to know such as 'boot -v' or whatever, just let me know. >How-To-Repeat: n/a >Fix: Heh, I don't know if you will like the name 'ATA_NFORCE2_MCP2S'. I just took the 'MCP2S' from the pciconf to create a different name than just 'ATA_NFORCE2'. --- ata-nforce2.diff begins here --- --- sys/dev/ata/ata-pci.h.orig Thu Sep 2 17:43:39 2004 +++ sys/dev/ata/ata-pci.h Thu Sep 2 17:54:46 2004 @@ -129,6 +129,7 @@ #define ATA_NVIDIA_ID 0x10de #define ATA_NFORCE1 0x01bc10de #define ATA_NFORCE2 0x006510de +#define ATA_NFORCE2_MCP2S 0x008510de #define ATA_NFORCE3 0x00d510de #define ATA_PROMISE_ID 0x105a --- sys/dev/ata/ata-chipset.c.orig Thu Sep 2 17:45:13 2004 +++ sys/dev/ata/ata-chipset.c Thu Sep 2 17:54:43 2004 @@ -1104,6 +1104,7 @@ static struct ata_chip_id ids[] = {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA5, "nVidia nForce" }, { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA6, "nVidia nForce2" }, + { ATA_NFORCE2_MCP2S, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA6, "nVidia nForce2" }, { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; --- ata-nforce2.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: