hmm, on Fri, Oct 16, 2009 at 08:31:13PM +0200, Jonathan Gray said that
> It sounds like this device should not be referred to
> as AHCI if it attaches to pciide and does not claim
> an AHCI interface.

ok, i guess i wan't clear enough, let me try again.

the notebook is ahci capable.  but i use it in ide mode
at the moment.

the pciide patch is needed, so in ide mode, pciide can
use dma (and not only pio).

the ahci patch makes the disk work in ahci mode when i flip
the switch in the bios to ahci mode. without it i had
port reset messages and the drive is not found.


i dont have the pcidump on me at the moment, but
i looked at its output and it was vendor NVIDIA,
product PCI_PRODUCT_NVIDIA_MCP77_AHCI_1 (0x0ad0).
that's how i found which PCI_PRODUCT_NVIDIA_MCP77_AHCI_?
to add to ahci.c

if both patches are present in the kernel and the disk
is in ide mode, one has to disable ahci in ukc so
the controller attaches to pciide and not ahci.


in an ideal world, probably only the ahci patch would be
needed.  but i also want to be able to use the disk in
ide mode hence the pciide patch.

i can send the pcidump output on monday..

> On Fri, Oct 16, 2009 at 06:34:58AM +0200, frantisek holop wrote:
> > 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...

-- 
a kick in the ass is a step forward.

Reply via email to