From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 9 17:27:14 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B267916A4CE for ; Sat, 9 Apr 2005 17:27:14 +0000 (GMT) Received: from mail.foolishgames.com (mail.foolishgames.com [216.55.178.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E85643D1D for ; Sat, 9 Apr 2005 17:27:14 +0000 (GMT) (envelope-from luke@foolishgames.com) Received: from [192.168.0.49] (24.247.120.6.kzo.mi.chartermi.net [24.247.120.6]) (authenticated bits=0)j39HRCV0088836 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Sat, 9 Apr 2005 10:27:13 -0700 (PDT) (envelope-from luke@foolishgames.com) X-Authentication-Warning: mail.foolishgames.com: Host 24.247.120.6.kzo.mi.chartermi.net [24.247.120.6] claimed to be [192.168.0.49] X-Habeas-Swe-5: Sender Warranted Email (SWE) (tm). The sender of this Mime-Version: 1.0 (Apple Message framework v619.2) X-Habeas-Swe-8: Message (HCM) and not spam. Please report use of this X-Habeas-Swe-3: like Habeas SWE (tm) X-Habeas-Swe-6: email in exchange for a license for this Habeas X-Habeas-Swe-1: winter into spring Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0e82862eed1dddaca9b75c3e2680f646@foolishgames.com> X-Habeas-Swe-9: mark in spam to . X-Habeas-Swe-4: Copyright 2002 Habeas (tm) Content-Transfer-Encoding: 7bit From: Lucas Holt X-Habeas-Swe-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-Swe-2: brightly anticipated Date: Sat, 9 Apr 2005 13:22:58 -0400 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.619.2) Subject: Nvidia nforce2 sata controller X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2005 17:27:14 -0000 I have a MSI k7n2 delta2 lsr motherboard (msicomputer.com). Odd as it sounds, it has a nvidia sata controller. From a post on current in december, I learned it uses the pata controller and another chip in front of it. The sata controller is not detected by 5-STABLE and i'd like to see it included. I noticed the how to write a problem report documentation recommended bouncing things off a mailing list first. Here i am. I've played around with the sources of the ata driver and managed to get the card to report properly with hints from that thread in december on current. I also figured out that having the controller initialize with the sata init routine instead of the via init seemed to make it work and negotiate SA150. i'm still having a few stability problems with the system. I don't know if its the driver or my NIC. It tends to only happen when i'm using the network (cvsup, etc) so i'm not sure. in /usr/src/sys/dev/ata/ i made the following changes ata-chipset.c: The ata_nvidia_ident function now contains this int ata_nvidia_ident(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA, ATA_UDMA5, "nVidia nForce" }, { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2" }, { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2 MCP" }, { ATA_NFORCE2_MCP_S, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce2 MCP SATA" }, { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, { ATA_NFORCE3_PRO, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 Pro" }, { ATA_NFORCE3_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 MCP" }, { ATA_NFORCE4, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce4" }, { 0, 0, 0, 0, 0, 0}}; I added { ATA_NFORCE2_MCP_S, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce2 MCP SATA" }, Then in ata_nvidia_chipinit(device_t dev) if (ctlr->chip->max_dma >= ATA_SA150) ctlr->setmode = ata_sata_setmode; else ctlr->setmode = ata_via_family_setmode; before there was only the else clause. Finally ata-pci.h has one new definition #define ATA_NFORCE2_MCP_S 0x008e10de (i used _S for sata in this case.. ) I realize this isn't packaged well. I'd appreciate any comments on the patch or how to get it to a point i could use send-pr or have someone commit it. It would make my life easier. oh, i cvsup'd RELENG_5 yesterday and built the system with it. Thats what the changes were done on. Here's some output from atacontrol after i made the changes: deathstar# atacontrol list ATA channel 0: Master: acd0 ATA/ATAPI revision 0 Slave: no device present ATA channel 1: Master: no device present Slave: no device present ATA channel 2: Master: ad4 Serial ATA v1.0 Slave: no device present ATA channel 3: Master: ad6 Serial ATA v1.0 Slave: no device present deathstar# atacontrol mode 2 Master = SATA150 Slave = BIOSPIO deathstar# Lucas Holt Luke@FoolishGames.com ________________________________________________________ FoolishGames.com (Jewel Fan Site) JustJournal.com (Free blogging) FoolishGames.net (Enemy Territory IoM site)