Re: AHCI driver port update - working with hot-plug

2009-06-11 Thread Hasso Tepper
Matthew Dillon wrote:
 It's fairly easy to get it wrong and for the system to not be able
 to find the root mount, in which case carefully specifying it on the
 kernel's mountroot line should get you into single-user.

AFAICS it just continues - ie if you wanted to boot into multi-user, 
you'll get this one.

 I am particularly interested in systems which have a separate,
 traditional non-AHCI ATA device as well as one or more AHCI
 devices, I'd like to know that AHCI picks up the AHCI devices and NATA
 picks up the non-AHCI devices properly.

Seems to work here on my laptop. I'm not brave enough to do any stress 
tests though ;).

...
atapci0: Intel ATA controller port 
0x18e0-0x18ef,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
ata0: ATA channel 0 on atapci0
acd0: DVDR MATSHITADVD-RAM UJ-852/RB02 at ata0-master UDMA33
ata1: ATA channel 1 on atapci0
match generic sata
match generic sata
ahci0: AHCI-PCI-SATA port 
0x1c00-0x1c1f,0x1c20-0x1c23,0x1c28-0x1c2f,0x1c24-0x1c27,0x1c30-0x1c37 mem 
0xf8426000-0xf84267ff irq 10 at device 31.2 on pci0
match generic sata
ahci0: AHCI 1.1 capabilities 
0xe710ff82S64A,NCQ,SSNTF,SALP,SAL,SCLO,PMD,SSC,PSC,CCCS, 3 ports, 32 
tags/port, gen 1 (1.5Gbps)
ahci0.0: Found DISK WDC WD5000BEVT-00ZAT0 01.01A01 serial= 
WD-WXN109NH2596
ahci0.0: tags=32/32 satacaps=1f06 satafeat=004c capacity=476940.02MB
ahci0.0: f85=7469 f86=bc09 f87=6163 WC=enabled RA=enabled SEC=frozen
ahci0.2: No device detected
...


-- 
Hasso Tepper


Re: AHCI driver port update - working with hot-plug

2009-06-08 Thread Eugene Barsukowski
A letter from Matthew Dillon dil...@apollo.backplane.com, Sat, 6 Jun 2009 
11:35:50 -0700 (PDT):

 I am particularly interested in systems which have a separate,
 traditional non-AHCI ATA device as well as one or more AHCI devices,
 I'd like to know that AHCI picks up the AHCI devices and NATA picks
 up the non-AHCI devices properly.



I have an old motherboard with 2 non-AHCI SATA controllers. Despite preloaded
ahci.ko booting the latest snapshot gives the following:

DragonFly 2.3.1-DEVELOPMENT #0: Sun Jun  7 01:29:14 CEST 2009
r...@chlamydia.fs.ei.tum.de:/usr/obj/usr/src/sys/GENERIC
TSC clock: 2393852464 Hz, i8254 clock: 1193108 Hz
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2394.01-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0xf29  Stepping = 9
  
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Features2=0x4400CNXT-ID,xTPR
  Hyperthreading: 2 logical CPUs
real memory  = 2146631680 (2096320K bytes)
avail memory = 2070138880 (2021620K bytes)
Preloaded elf kernel /boot/kernel at 0xc07fa000.
Preloaded elf module /boot/modules/ahci.ko at 0xc07fa24c.

Preloaded elf module /boot/modules/acpi.ko at 0xc07fa2f8.
Pentium Pro MTRR support enabled
md0: Malloc disk
pcibios: BIOS version 2.10
Using $PIR table, 12 entries at 0xc00f3310
ACPI: RSDP @ 0x0xf5a90/0x0014 (v  0 ACPIAM)
ACPI: RSDT @ 0x0x7ff3/0x0030 (v  1 INTEL  PRODUCT1 0x20030904 MSFT 
0x0097

atapci0: Promise PDC20319 SATA150 controller port 
0xb000-0xb07f,0xb400-0xb40f,0xbc00-0xbc3f mem 
0xfeaa-0xfeab,0xfeafe000-0xfeafefff irq 9 at device 7.0 on pci3
ata2: ATA channel 0 on atapci0
ata3: ATA channel 1 on atapci0
ata4: ATA channel 2 on atapci0
ata5: ATA channel 3 on atapci0

atapci1: Intel ICH5 UDMA100 controller port 
0xffa0-0xffaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
ata0: ATA channel 0 on atapci1
acd0: DVDR Optiarc DVD RW AD-7173A/1-01 at ata0-master UDMA66
ata1: ATA channel 1 on atapci1
atapci2: Intel ICH5 SATA150 controller port 
0xdc00-0xdc0f,0xe000-0xe003,0xe400-0xe407,0xe800-0xe803,0xec00-0xec07 irq 10 at 
device 31.2 on pci0
ata6: ATA channel 0 on atapci2
ad12: 152627MB Seagate ST3160815AS 4.AAB at ata6-master SATA150
ata7: ATA channel 1 on atapci2

Full dmesg is attached.
Unfortunately this board has no AHCI SATA. Hope this will be useful.

Best regards,
Eugene.

Copyright (c) 2003-2009 The DragonFly Project.
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
DragonFly 2.3.1-DEVELOPMENT #0: Sun Jun  7 01:29:14 CEST 2009
r...@chlamydia.fs.ei.tum.de:/usr/obj/usr/src/sys/GENERIC
TSC clock: 2393852464 Hz, i8254 clock: 1193108 Hz
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2394.01-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0xf29  Stepping = 9
  
Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Features2=0x4400CNXT-ID,xTPR
  Hyperthreading: 2 logical CPUs
real memory  = 2146631680 (2096320K bytes)
avail memory = 2070138880 (2021620K bytes)
Preloaded elf kernel /boot/kernel at 0xc07fa000.
Preloaded elf module /boot/modules/ahci.ko at 0xc07fa24c.
Preloaded elf module /boot/modules/acpi.ko at 0xc07fa2f8.
Pentium Pro MTRR support enabled
md0: Malloc disk
pcibios: BIOS version 2.10
Using $PIR table, 12 entries at 0xc00f3310
ACPI: RSDP @ 0x0xf5a90/0x0014 (v  0 ACPIAM)
ACPI: RSDT @ 0x0x7ff3/0x0030 (v  1 INTEL  PRODUCT1 0x20030904 MSFT 
0x0097)
ACPI: FACP @ 0x0x7ff30200/0x0081 (v  2 INTEL  PRODUCT1 0x20030904 MSFT 
0x0097)
ACPI: DSDT @ 0x0x7ff30370/0x424E (v  1 INTEL  PRODUCT1 0x0001 MSFT 
0x010D)
ACPI: FACS @ 0x0x7ff4/0x0040
ACPI: APIC @ 0x0x7ff30300/0x0068 (v  1 INTEL  PRODUCT1 0x20030904 MSFT 
0x0097)
ACPI: WDDT @ 0x0x7ff345c0/0x0040 (v  1 INTEL  OEMWDDT  0x0001 MSFT 
0x010D)
npx0: math processor on motherboard
npx0: INT 16 interface
Using XMM optimized bcopy/copyin/copyout
acpi0: INTEL PRODUCT1 on motherboard
acpi0: Power Button (fixed)
Warning: ACPI is disabling APM's device.  You can't run both
acpi_timer0: 24-bit timer at 3.579545MHz port 0x408-0x40b on acpi0
cpu0: ACPI CPU on acpi0
cpu_cst0: ACPI CPU C-State on cpu0
cpu_pst0: Can't get _PCT package - AE_NOT_FOUND
acpi_button0: Sleep Button on acpi0
atkbdc0: Keyboard controller (i8042) port 0x64,0x60 irq 1 on acpi0
atkbd0: AT Keyboard flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
legacypci0 on motherboard
pcib0: Host to PCI bridge on legacypci0

Re: AHCI driver port update - working with hot-plug

2009-06-08 Thread Matthew Dillon

:I have an old motherboard with 2 non-AHCI SATA controllers. Despite preloaded
:ahci.ko booting the latest snapshot gives the following:

Sure, that's to be expected.  Since they aren't AHCI-capable the
AHCI driver did not pick them up, and the ATA driver did.  That's
a good test too, we don't want the AHCI driver trying to pick up
non-AHCI ATA devices :-)

-Matt



AHCI driver port update - working with hot-plug

2009-06-06 Thread Matthew Dillon
The AHCI driver is now working for DISK and ATAPI attachments, and
hot-plug also now works.

All major features except port multiplier support are now operational.

The hot-plug support is very recent and probably needs some tweaking,
but it works with my basic tests.

Port multiplier support is upcoming, I expect to get it written fairly
quickly once I get the PM hardware I've ordered.


TESTING (not for the light hearted)


Both the AHCI and the NATA devices may be specified in kernel builds,
and AHCI can be loaded as a module too which is how I would suggest
people use it for the moment.  That is, you can leave NATA in your
kernel build and load AHCI as a module in /boot/loader.conf:

ahci_load=YES

Note that you must do a full kernel build and install to make sure
everything is in sync.

Your ATA disk devices, for example, 'ad4', will become SCSI disk devices,
for example 'da0'.  You thus need to modify your /etc/fstab and if you
are using a boot + root HAMMER configuration you also need to adjust
the root filesystem mount line in your /boot/loader.conf.

It's fairly easy to get it wrong and for the system to not be able to
find the root mount, in which case carefully specifying it on the
kernel's mountroot line should get you into single-user.

I am particularly interested in systems which have a separate,
traditional non-AHCI ATA device as well as one or more AHCI devices,
I'd like to know that AHCI picks up the AHCI devices and NATA picks
up the non-AHCI devices properly.

-Matt