Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2005 13:55:12 -0700
From:      security@daemon.jim-liesl.org
To:        liettneff <liettneff@bk.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Re[2]: New Nforce2 variant doesn't recognize SATA as SATA
Message-ID:  <20050313135512.qi7wgnna68w44css@www.jim-liesl.org>
In-Reply-To: <1151639856.20050313213652@bk.ru>
References:  <200503112157.j2BLvChb029410@the-macgregors.org> <42322142.3060200@jim-liesl.org> <1151639856.20050313213652@bk.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Michael Lednev <liettneff@bk.ru>:

> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050313135512.qi7wgnna68w44css>