hi there,

the following addition makes ahci work on my MCP77.
if this piece is present together with the ide
compatibility patch, and the disk is not in ahci
mode, ahci must be disabled in ukc to force the
chipset into compatibility mode.

i experimented with both modes because the other
systems on the disk can't do ahci yet.

just out of curiosity, is there a reason why not all
PCI_PRODUCT_NVIDIA_MCP*_AHCI_* id's are listed?


Index: ahci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.150
diff -u -r1.150 ahci.c
--- ahci.c      13 Oct 2009 00:19:38 -0000      1.150
+++ ahci.c      16 Oct 2009 04:21:55 -0000
@@ -438,6 +438,8 @@
            NULL,               ahci_nvidia_mcp_attach },
        { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP73_AHCI_9,
            NULL,               ahci_nvidia_mcp_attach },
+       { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP77_AHCI_1,
+           NULL,               ahci_nvidia_mcp_attach },
        { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP77_AHCI_5,
            NULL,               ahci_nvidia_mcp_attach },


the difference between ide mode and ahci mode:

--- dmesg.bsd.16        Fri Oct 16 05:59:30 2009
+++ dmesg.bsd.16.ahci   Fri Oct 16 06:19:52 2009
@@ -2,14 +2,11 @@
     f...@amaaq:/adata/home/f/usr/src/sys/arch/i386/compile/GENERIC
 cpu0: AMD Turion(tm) X2 Ultra Dual-Core Mobile ZM-80 ("AuthenticAMD" 
686-class, 1024KB L2 cache) 2.11 GHz
 cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16
-real mem  = 3217108992 (3068MB)
-avail mem = 3125407744 (2980MB)
+real mem  = 3217104896 (3068MB)
+avail mem = 3125403648 (2980MB)
 User Kernel Config
 UKC> disable acpicpu
 474 acpicpu* disabled
 UKC> quit
 Continuing...
 mainbus0 at root
@@ -73,15 +70,11 @@
 audio0 at azalia0
 ppb0 at pci0 dev 8 function 0 "NVIDIA MCP77 PCI" rev 0xa1
 pci1 at ppb0 bus 1
-pciide1 at pci0 dev 9 function 0 "NVIDIA MCP77 AHCI" rev 0xa2: DMA
-pciide1: using apic 0 int 10 (irq 10) for native-PCI interrupt
-wd0 at pciide1 channel 0 drive 0: <FUJITSU MHZ2320BH G2>
-wd0: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
-atapiscsi0 at pciide1 channel 0 drive 1
-scsibus0 at atapiscsi0: 2 targets
-cd0 at scsibus0 targ 0 lun 0: <Optiarc, DVD RW AD-7560S, SX01> ATAPI 5/cdrom 
removable
-wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
-cd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 5
+ahci0 at pci0 dev 9 function 0 "NVIDIA MCP77 AHCI" rev 0xa2: apic 0 int 10 
(irq 10), AHCI 1.2
+scsibus0 at ahci0: 32 targets
+sd0 at scsibus0 targ 0 lun 0: <ATA, FUJITSU MHZ2320B, 0000> SCSI3 0/direct 
fixed
+sd0: 305245MB, 512 bytes/sec, 625142448 sec total
+cd0 at scsibus0 targ 2 lun 0: <Optiarc, DVD RW AD-7560S, SX01> ATAPI 5/cdrom 
removable
 nfe0 at pci0 dev 10 function 0 "NVIDIA MCP77 LAN" rev 0xa2: apic 0 int 5 (irq 
5), address 00:21:85:55:af:d3
 eephy0 at nfe0 phy 1: 88E1116 Gigabit PHY, rev. 1
 ppb1 at pci0 dev 16 function 0 "NVIDIA MCP77 PCIE" rev 0xa1: apic 0 int 7 (irq 
7)
@@ -149,4 +142,4 @@
 vscsi0 at root
 scsibus2 at vscsi0: 256 targets
 softraid0 at root
-root on wd0a swap on wd0b dump on wd0b
+root on sd0a swap on sd0b dump on sd0b


-f
-- 
go and catch a falling star...

Reply via email to