Re: pciide: ATI IXP 600 SATA

2007-04-17 Thread Markus Hennecke

On Mon, 16 Apr 2007, alemao wrote:


I get the dmesg of ahci identifying my card. If you want to send me more
patchs to test it's ok.
I need to set tty com0 at boot.conf and unplug my usb devices from it to
boot (kbd and mouse, this machine don't have PS/2). It's strange, after the
bootloader timeouts and start to load kernel, it stops at entry point
xxx and then i need to type something to load the kernel.. w/o usb
devices, it boot fine.


I have exactly the same problem and reported it already to pascoe@ and 
[EMAIL PROTECTED] This seems to be some quirk with the ati chipset. The following 
patch (more a hack) made it work for me, so that I could read the 
partition table of my hds. As the box is currently used in my company I 
can not check further to test if it really works.


Index: ahci.c
===
RCS file: /cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.112
diff -u -p -r1.112 ahci.c
--- ahci.c  8 Apr 2007 09:13:31 -   1.112
+++ ahci.c  17 Apr 2007 11:19:01 -
@@ -1101,7 +1101,9 @@ ahci_port_start(struct ahci_port *ap, in

/* Turn on FRE (and ST) */
r = ahci_pread(ap, AHCI_PREG_CMD)  ~AHCI_PREG_CMD_ICC;
+#if 0
r |= AHCI_PREG_CMD_FRE;
+#endif
if (!fre_only)
r |= AHCI_PREG_CMD_ST;
ahci_pwrite(ap, AHCI_PREG_CMD, r);
@@ -1115,9 +1117,11 @@ ahci_port_start(struct ahci_port *ap, in
}
 #endif

+#if 0
/* Wait for FR to come on */
if (ahci_pwait_set(ap, AHCI_PREG_CMD, AHCI_PREG_CMD_FR))
return (2);
+#endif

/* Wait for CR to come on */
if (!fre_only  ahci_pwait_set(ap, AHCI_PREG_CMD, AHCI_PREG_CMD_CR))


The function is used with the fre_only set to 0 in the whole driver. But 
this may change in the future, so this is no permanent solution. For the 
initialization the FR bit is already set when the function is called, so 
no problems should occure there.


Greetings
  Markus



Re: pciide: ATI IXP 600 SATA

2007-04-17 Thread alemao
Markus,

It worked fine here. And i got a lot of increase in I/O subsystem.

# dd if=/dev/rsd0f of=/dev/null bs=1024k
^C243+0 records in
243+0 records out
254803968 bytes transferred in 4.318 secs (59004868 bytes/sec)
# expr 59004868 / 1024
57621
#

I was getting just 1 MB/s. BTW, this machine i use day by day, and gonna
report if something go wrong.

Below my dmesg.
OpenBSD 4.1-current (GENERIC.MP) #4: Tue Apr 17 09:09:38 BRT 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1038069760 (1013740K)
avail mem = 877133824 (856576K)
using 22937 buffers containing 104013824 bytes (101576K) of memory
mainbus0 (root)
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0450 (68 entries)
bios0: Dell Inc. OptiPlex 320
acpi0 at mainbus0: rev 2
acpi0: tables DSDT FACP SSDT APIC BOOT MCFG HPET SLIC 
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Pentium(R) D CPU 3.00GHz, 3000.55 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,xTPR,NXE,LONG
cpu0: 2MB 64b/line 8-way L2 cache
cpu0: apic clock running at 200MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Pentium(R) D CPU 3.00GHz, 3000.11 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,xTPR,NXE,LONG
cpu1: 2MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 8 pa 0xfec0, version 21, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 8
acpiprt0 at acpi0: bus 1 (PCI1)
acpiprt1 at acpi0: bus 0 (PCI2)
acpiprt2 at acpi0: bus 0 (PCI3)
acpiprt3 at acpi0: bus 0 (PCI4)
acpiprt4 at acpi0: bus 0 (PCI5)
acpiprt5 at acpi0: bus 0 (PCI6)
acpiprt6 at acpi0: bus 0 (PCI8)
acpiprt7 at acpi0: bus 2 (PCI7)
acpiprt8 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: CPU0: acpicpu1: C2 not supported
acpicpu1: C3 not supported
no performance/throttling supported
acpicpu1 at acpi0: CPU1: acpicpu2: C2 not supported
acpicpu2: C3 not supported
no performance/throttling supported
acpicpu2 at acpi0: CPU2: acpicpu3: C2 not supported
acpicpu3: C3 not supported
no performance/throttling supported
acpicpu3 at acpi0: CPU3: acpicpu4: C2 not supported
acpicpu4: C3 not supported
no performance/throttling supported
acpibtn0 at acpi0: VBTN
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 vendor ATI, unknown product 0x5a33 rev 0x01
ppb0 at pci0 dev 1 function 0 ATI RS480 PCIE rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 5 function 0 ATI Radeon XPRESS 200 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ahci0 at pci0 dev 18 function 0 ATI IXP600 SATA rev 0x00 GHC 0x0: AHCI 1.1: 
apic 8 int 22 (irq 11)
ahci0: capabilities: 
0xf722ff83S64A,NCQ,SSNTF,SMPS,SALP,SAL,SCLO,SPM,PMD,SSC,PSC,CCCS ports: 4 
ncmds: 32 gen: 1 (1.5Gbps) and 2 (3Gbps)
ahci0: ports implemented: 0x000f
ahci0.0: port reset
ahci0: detected device on port 0
ahci0.1: port reset
ahci0: no device detected on port 1
ahci0.2: port reset
ahci0: no device detected on port 2
ahci0.3: port reset
ahci0: no device detected on port 3
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: ATA, SAMSUNG HD080HJ/, ZH10 SCSI2 0/direct fixed
sd0: 76293MB, 9726 cyl, 255 head, 63 sec, 512 bytes/sec, 15625 sec total
ohci0 at pci0 dev 19 function 0 ATI IXP600 USB rev 0x00: apic 8 int 16 (irq 
10), version 1.0, legacy support
ohci1 at pci0 dev 19 function 1 ATI IXP600 USB rev 0x00: apic 8 int 17 (irq 
5), version 1.0, legacy support
ohci2 at pci0 dev 19 function 2 ATI IXP600 USB rev 0x00: apic 8 int 18 (irq 
3), version 1.0, legacy support
ohci3 at pci0 dev 19 function 3 ATI IXP600 USB rev 0x00: apic 8 int 17 (irq 
5), version 1.0, legacy support
ohci4 at pci0 dev 19 function 4 ATI IXP600 USB rev 0x00: apic 8 int 18 (irq 
3), version 1.0, legacy support
ehci0 at pci0 dev 19 function 5 ATI IXP600 USB2 rev 0x00: apic 8 int 19 (irq 
11)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0
uhub0: ATI EHCI root hub, rev 2.00/1.00, addr 1
uhub0: 10 ports with 10 removable, self powered
piixpm0 at pci0 dev 20 function 0 ATI IXP600 SMBus rev 0x13: SMI
iic0 at piixpm0
pciide0 at pci0 dev 20 function 1 ATI IXP600 IDE rev 0x00: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: TSSTcorp, CDRWDVD TS-H492C, DE02 SCSI0 5/cdrom 
removable
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
azalia0 at pci0 dev 20 function 2 ATI IXP600 HD Audio rev 0x00: apic 8 int 16 
(irq 10)
azalia0: host: High Definition Audio rev. 1.0
azalia0: codec: Analog Devices AD1983 (rev. 4.0), HDA version 1.0
audio0 at azalia0
pcib0 at pci0 dev 20 function 3 ATI IXP600 LPC rev 0x00
ppb1 at 

Re: pciide: ATI IXP 600 SATA

2007-04-16 Thread alemao
Hi Jonathan,

With the patch, it finds the device, but no hard disks at all. I could send
you a dmesg but it passes ahci and i can't see the messages it gives me.
Then it enters on ddb and i cannot type (usb keyboard is not ready yet at
this level).

There's something i can do to it stops just after ahci loads, so i can write
the messages somewhere?

Thanks.



Re: pciide: ATI IXP 600 SATA

2007-04-16 Thread alemao
Jonathan,

I get the dmesg of ahci identifying my card. If you want to send me more
patchs to test it's ok.
I need to set tty com0 at boot.conf and unplug my usb devices from it to
boot (kbd and mouse, this machine don't have PS/2). It's strange, after the
bootloader timeouts and start to load kernel, it stops at entry point
xxx and then i need to type something to load the kernel.. w/o usb
devices, it boot fine.

below is dmesg
[ using 598688 bytes of bsd ELF symbol table ]  


Copyright (c) 1982, 1986, 1989, 1991, 1993  


The Regents of the University of California.  All rights reserved.  


Copyright (c) 1995-2007 OpenBSD. All rights reserved.  http://www.OpenBSD.org   
  



OpenBSD 4.1-current (GENERIC.MP) #3: Mon Apr 16 18:35:20 BRT 2007   
  

[EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 

real mem = 1038069760 (1013740K)

avail mem = 877133824 (856576K)   

using 22937 buffers containing 104013824 bytes (101576K) of memory  


mainbus0 (root)   

bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0450 (68 entries)   
  

bios0: Dell Inc. OptiPlex 320 

acpi0 at mainbus0: rev 2

acpi0: tables DSDT FACP SSDT APIC BOOT MCFG HPET SLIC   
  

acpitimer0 at acpi0: 3579545 Hz, 24 bits

acpimadt0 at acpi0 addr 0xfee0: PC-AT compat


cpu0 at mainbus0: apid 0 (boot processor)   
  

cpu0: Intel(R) Pentium(R) D CPU 3.00GHz, 3000.48 MHz


cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF  
  

LUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,C
   

xTPR,NXE,LONG 

cpu0: 2MB 64b/line 8-way L2 cache 

cpu0: apic clock running at 200MHz  

cpu1 at mainbus0: apid 1 (application processor)


cpu1: Intel(R) Pentium(R) D CPU 3.00GHz, 3000.11 MHz


cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF  
  

LUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,CNXT-ID,CX16,


xTPR,NXE,LONG 

cpu1: 2MB 64b/line 8-way L2 cache 

ioapic0 at mainbus0 apid 8 pa 0xfec0, version 21, 24 pins   
  

ioapic0: misconfigured as apic 0, remapped to apid 8


acpiprt0 at acpi0: bus 1 (PCI1)   

acpiprt1 at acpi0: bus 0 (PCI2)   

acpiprt2 at acpi0: bus 0 (PCI3)   

acpiprt3 at acpi0: bus 0 (PCI4)   

acpiprt4 at acpi0: bus 0 (PCI5)   

acpiprt5 at acpi0: bus 0 (PCI6)   

acpiprt6 at acpi0: bus 0 (PCI8)   

acpiprt7 at acpi0: bus 2 (PCI7)   

acpiprt8 at acpi0: bus 0 (PCI0)   

acpicpu0 at acpi0: CPU0: acpicpu1: C2 not supported 
  

acpicpu1: C3 not supported  

no performance/throttling supported   

acpicpu1 at acpi0: CPU1: acpicpu2: C2 not supported 
  

acpicpu2: C3 not supported  

no performance/throttling supported   

acpicpu2 at acpi0: CPU2: acpicpu3: C2 not supported 
  

acpicpu3: C3 not supported  

no performance/throttling supported   

acpicpu3 at acpi0: CPU3: acpicpu4: C2 not supported 
  

acpicpu4: C3 not supported  

no performance/throttling 

Re: pciide: ATI IXP 600 SATA

2007-04-14 Thread Jonathan Gray
On Fri, Apr 13, 2007 at 06:27:52PM +0100, Stuart Henderson wrote:
 On 2007/04/13 13:57, alemao wrote:
  Is there any progress to support DMA on this chipset?
 
 ahci(4) is probably your best bet, but only JMicron and VT8251
 are handled so far.

Well only Intel and JMicron devices are known to work so far.

But any device that advertises the AHCI PCI class should
at least try to attach.

But the SB600 along with recent chips from NVIDIA(MCP65+), SiS(966+) etc
should work.  Try the following diff:

Index: sys/dev/pci/ahci.c
===
RCS file: /cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.112
diff -u -p -r1.112 ahci.c
--- sys/dev/pci/ahci.c  8 Apr 2007 09:13:31 -   1.112
+++ sys/dev/pci/ahci.c  14 Apr 2007 05:57:52 -
@@ -417,6 +417,10 @@ intahci_vt8251_attach(struct 
ahci_sof
struct pci_attach_args *);
 
 static const struct ahci_device ahci_devices[] = {
+   { PCI_VENDOR_ATI,   PCI_PRODUCT_ATI_IXP_SATA_600_1,
+   NULL,   NULL },
+   { PCI_VENDOR_ATI,   PCI_PRODUCT_ATI_IXP_SATA_600_2,
+   NULL,   NULL },
{ PCI_VENDOR_JMICRON,   PCI_PRODUCT_JMICRON_JMB360,
ahci_jmicron_match, ahci_jmicron_attach },
{ PCI_VENDOR_JMICRON,   PCI_PRODUCT_JMICRON_JMB361,



Re: pciide: ATI IXP 600 SATA

2007-04-13 Thread Stuart Henderson
On 2007/04/13 13:57, alemao wrote:
 Is there any progress to support DMA on this chipset?

ahci(4) is probably your best bet, but only JMicron and VT8251
are handled so far.