Nvidia nforce2 sata controller

Lucas Holt luke at foolishgames.com
Sat Apr 9 10:27:14 PDT 2005


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 <COMPAQ DVD-ROM GDR8160B/0012> ATA/ATAPI revision 0
     Slave:       no device present
ATA channel 1:
     Master:      no device present
     Slave:       no device present
ATA channel 2:
     Master:  ad4 <WDC WD800JD-23JNA1/06.01C06> Serial ATA v1.0
     Slave:       no device present
ATA channel 3:
     Master:  ad6 <WDC WD800JD-23JNA1/06.01C06> Serial ATA v1.0
     Slave:       no device present
deathstar# atacontrol mode 2
Master = SATA150
Slave  = BIOSPIO
deathstar#

Lucas Holt
Luke at FoolishGames.com
________________________________________________________
FoolishGames.com  (Jewel Fan Site)
JustJournal.com (Free blogging)
FoolishGames.net (Enemy Territory IoM site)



More information about the freebsd-hackers mailing list