From owner-freebsd-stable@FreeBSD.ORG Sun Mar 13 20:55:14 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B2EA16A4CE for ; Sun, 13 Mar 2005 20:55:14 +0000 (GMT) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id C12B543D1F for ; Sun, 13 Mar 2005 20:55:13 +0000 (GMT) (envelope-from security@daemon.jim-liesl.org) Received: from daemon.jim-liesl.org ([69.170.98.158]) by mta11.adelphia.net ESMTP <20050313205513.BSHC5402.mta11.adelphia.net@daemon.jim-liesl.org>; Sun, 13 Mar 2005 15:55:13 -0500 Received: by daemon.jim-liesl.org (Postfix, from userid 80) id C80B26172; Sun, 13 Mar 2005 13:55:12 -0700 (MST) Received: from 69-170-98-158.clspco.adelphia.netwww.jim-liesl.org (Horde) with HTTP for ; Sun, 13 Mar 2005 13:55:12 -0700 Message-ID: <20050313135512.qi7wgnna68w44css@www.jim-liesl.org> Date: Sun, 13 Mar 2005 13:55:12 -0700 From: security@daemon.jim-liesl.org To: liettneff References: <200503112157.j2BLvChb029410@the-macgregors.org> <42322142.3060200@jim-liesl.org> <1151639856.20050313213652@bk.ru> In-Reply-To: <1151639856.20050313213652@bk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.0.1) / FreeBSD-5.3 cc: freebsd-stable@freebsd.org Subject: Re: Re[2]: New Nforce2 variant doesn't recognize SATA as SATA X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 20:55:14 -0000 Quoting Michael Lednev : > Hello, secmgr. > > On 12 =EC=E0=F0=F2=E0 2005 =E3., 1:52:50 you wrote: > > you can look here http://www.freebsd.org/cgi/query-pr.cgi?pr=3D75540 > this patch adds support for nforce3 and 4 sata controllers, i think > with little modification it will do for nforce2 > Michael, Many thanks! I'll include my diff's below from 5.3 release diff -Naur sys/dev/ata/ata-pci.h.orig sys/dev/ata/ata-pci.h --- sys/dev/ata/ata-pci.h.orig Thu Mar 10 14:02:23 2005 +++ sys/dev/ata/ata-pci.h Sun Mar 13 12:18:14 2005 @@ -132,6 +132,7 @@ #define ATA_NFORCE1 0x01bc10de #define ATA_NFORCE2 0x006510de #define ATA_NFORCE2_MCP 0x008510de +#define ATA_NFORCE2_MCP_S2 0x008e10de #define ATA_NFORCE3 0x00d510de #define ATA_NFORCE3_PRO 0x00e510de #define ATA_NFORCE3_PRO_S1 0x00e310de diff -Naur sys/dev/ata/ata-chipset.c.orig sys/dev/ata/ata-chipset.c --- sys/dev/ata/ata-chipset.c.orig Sun Mar 13 12:20:03 2005 +++ sys/dev/ata/ata-chipset.c Sun Mar 13 12:57:03 2005 @@ -1112,6 +1112,7 @@ {{ 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_S2, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce= 2 MCP_S2" }, { 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" }, @@ -2861,9 +2862,17 @@ static int ata_check_80pin(struct ata_device *atadev, int mode) { + device_t parent =3D device_get_parent(atadev->channel->dev); + struct ata_pci_controller *ctlr =3D device_get_softc(parent); + + if (mode >=3D ATA_UDMA2 && mode < ATA_SA150 && ctlr->chip->max_dma >= =3D ATA_SA150) { + ata_prtdev(atadev,"DMA set to SA150 for any device attached to SATA controller\n"); + return ATA_SA150; + } + if (mode > ATA_UDMA2 && !(atadev->param->hwres & ATA_CABLE_ID)) { ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n"); - mode =3D ATA_UDMA2; + return ATA_UDMA2; } return mode; } ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.