Re: HEADS UP: major CAM ATA MFC

2009-11-23 Thread Alexandre Sunny Kovalenko
On Thu, 2009-11-19 at 22:43 -0500, Alexandre Sunny Kovalenko wrote:
 On Wed, 2009-11-18 at 01:30 +0200, Alexander Motin wrote:
  Feedbacks are welcome as always.
  
 Works here (ThinkPad X60):
 
 ahci0: Intel ICH7M AHCI SATA controller port
 0x18d0-0x18d7,0x18c4-0x18c7,0x18c8-0x18cf,0x18c0-0x18c3,0x18b0-0x18bf
 mem 0xee00-0xee4447ff irq 16 at device 31.2 on pci0
 ahci0: [ITHREAD]
 ahci0: AHCI v1.10 with 4 1.5Gbps ports, Port Multiplier not supported
 ahcich0: AHCI channel at channel 0 on ahci0
 
 RabbitsDen# camcontrol tags ada0
 (pass0:ahcich0:0:0:0): device openings: 32
 RabbitsDen# 

Might be of interest for some other people out there: with this driver,
I can suspend/resume my ThinkPad X60 with UP kernel -- the original ATA
driver was going into the timeout loop upon resume.

-- 
Alexandre Kovalenko (Олександр Коваленко)


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-19 Thread Alexander Motin
Eugene Grosbein wrote:
 Jeremy Chadwick wrote:
 I didn't have this problem.  System has AHCI in use, and the kernel is
 built to make use of modular atacore.  Specifically:

 # Modular ATA
 device  atacore # Core ATA functionality
 device  ataisa  # ISA bus support
 device  atapci  # PCI bus support; only generic chipset 
 support
 device  ataahci # AHCI SATA
 device  ataintel# Intel
 
 How should STABLE user (not tracking freebsd-current@) learn about CAM ATA 
 configuration?
 There is ahci(4) manual page in 8.0-PRERELEASE but no ada(4) that is linked 
 here.
 
 I've just tried Modular ATA configuration of Intel ICH7-based system plus 
 device ahci
 minus all traditional ata(4) kernel configuration, the kernel builds fine
 but boot messages do not show any attempt to detect my SATA HDD,
 so root mount just fails (I use GEOM UFS labels in my /etc/fstab).
 Typing ? at mounroot prompt I see only daX devices standing for my USB 
 cardreader
 and no device for HDD.

Read ahci(4) carefully. It has all possible references. If you think it
is not enough, propose patches.

 It seems I miss ada(4) device and I cannot find it in 8.0 - not ada.ko nor 
 device ada.

ada, same as da goes as part of cam module. It is not possible to load
them separately now. But for kernel configuration it is separate option.

-- 
Alexander Motin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-19 Thread Jeremy Chadwick


On Thu, Nov 19, 2009 at 10:22:53AM +0200, Alexander Motin wrote:
 Eugene Grosbein wrote:
  Jeremy Chadwick wrote:
  I didn't have this problem.  System has AHCI in use, and the kernel is
  built to make use of modular atacore.  Specifically:
 
  # Modular ATA
  device  atacore # Core ATA functionality
  device  ataisa  # ISA bus support
  device  atapci  # PCI bus support; only generic chipset 
  support
  device  ataahci # AHCI SATA
  device  ataintel# Intel
  
  How should STABLE user (not tracking freebsd-current@) learn about CAM ATA 
  configuration?
  There is ahci(4) manual page in 8.0-PRERELEASE but no ada(4) that is linked 
  here.
  
  I've just tried Modular ATA configuration of Intel ICH7-based system plus 
  device ahci
  minus all traditional ata(4) kernel configuration, the kernel builds fine
  but boot messages do not show any attempt to detect my SATA HDD,
  so root mount just fails (I use GEOM UFS labels in my /etc/fstab).
  Typing ? at mounroot prompt I see only daX devices standing for my USB 
  cardreader
  and no device for HDD.
 
 Read ahci(4) carefully. It has all possible references. If you think it
 is not enough, propose patches.

I had no idea said details were in the ahci(4) man page, and I doubt the
rest of the user community will know that either.  There's also no man
page for ada(4).

There is some ambiguity in this part of the ahci(4) man page:

  AHCI hardware is also supported by ataahci driver from ata(4) subsystem.
  If both drivers are loaded at the same time, this one will be given
  precedence as the more functional of the two.

The grammar here is very difficult to understand; if both drivers is
too vague.  The way this paragraph can be interpreted:

- If both drivers could refer to ata(4) and ataahci
- If both drivers could refer to ata(4) and ahci(4)
- If both drivers could refer to ada(4) and ahci(4)
- If both drivers could refer to ahci(4) and ata(4)

I'll happily re-write the documentation for this if someone can take the
time to explain what the paragraph actually is trying to say.  Users are
going to be very, very confused if there is a driver called ataahci and
another driver called ahci.

Finally, appropriate details need to be placed into the i386 and amd64
kernel configuration files; either in GENERIC (commented out) or in
/sys/conf/NOTES.  As it stands, there's nothing that informs anyone of
this change, and if users are being pointed to the ahci(4) man page,
they're going to get confused (see above).

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-19 Thread Alexander Motin
Jeremy Chadwick wrote:
 AHCI in the BIOS is enabled, AHCI in FreeBSD is in use.
 
 Kernel configuration is below my .sig, ditto with dmesg.  World sources
 are from ~45 minutes prior to kernel build date (2009/11/17 20:07 PST).
 
 FreeBSD icarus.home.lan 8.0-PRERELEASE FreeBSD 8.0-PRERELEASE #0: Tue Nov 17 
 20:07:21 PST 2009 
 r...@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64  amd64
 
 Like I said, this whole thing needs to get documented.

FreeBSD now has two AHCI drivers - legacy ataahci from ata(4)
infrastructure and new ahci(4) from CAM. According to
atapci0: Intel ICH9 SATA300 controller ...
you are using legacy one. New one reports as
ahci0: Intel ICH8M AHCI SATA controller ...

-- 
Alexander Motin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-19 Thread Alexander Motin
Jeremy Chadwick wrote:
 On Thu, Nov 19, 2009 at 10:22:53AM +0200, Alexander Motin wrote:
 Read ahci(4) carefully. It has all possible references. If you think it
 is not enough, propose patches.
 
 I had no idea said details were in the ahci(4) man page, and I doubt the
 rest of the user community will know that either.  There's also no man
 page for ada(4).
 
 There is some ambiguity in this part of the ahci(4) man page:
 
   AHCI hardware is also supported by ataahci driver from ata(4) subsystem.
   If both drivers are loaded at the same time, this one will be given
   precedence as the more functional of the two.
 
 The grammar here is very difficult to understand; if both drivers is
 too vague.  The way this paragraph can be interpreted:
 
 - If both drivers could refer to ata(4) and ataahci

No. ataahci is a part of ata(4).

 - If both drivers could refer to ata(4) and ahci(4)

Yes, if with ata(4) understand it's ataahci part.

 - If both drivers could refer to ada(4) and ahci(4)

No. It is mentioned in ahci(4), that ada is peripheral driver. Not a
controller.

 - If both drivers could refer to ahci(4) and ata(4)

It is same as second.

 I'll happily re-write the documentation for this if someone can take the
 time to explain what the paragraph actually is trying to say. 

Welcome.

 Users are
 going to be very, very confused if there is a driver called ataahci and
 another driver called ahci.

This is temporal situation, until new infrastructure will settle. Then
old one will be removed.

 Finally, appropriate details need to be placed into the i386 and amd64
 kernel configuration files; either in GENERIC (commented out) or in
 /sys/conf/NOTES.  As it stands, there's nothing that informs anyone of
 this change, and if users are being pointed to the ahci(4) man page,
 they're going to get confused (see above).

Both new ahci and siis drivers are mentioned in NOTES file.

-- 
Alexander Motin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-19 Thread Andriy Gapon
on 19/11/2009 10:22 Alexander Motin said the following:
 Eugene Grosbein wrote:
 Jeremy Chadwick wrote:
 I didn't have this problem.  System has AHCI in use, and the kernel is
 built to make use of modular atacore.  Specifically:

 # Modular ATA
 device  atacore # Core ATA functionality
 device  ataisa  # ISA bus support
 device  atapci  # PCI bus support; only generic chipset 
 support
 device  ataahci # AHCI SATA
 device  ataintel# Intel
 How should STABLE user (not tracking freebsd-current@) learn about CAM ATA 
 configuration?
 There is ahci(4) manual page in 8.0-PRERELEASE but no ada(4) that is linked 
 here.
[snip]
 Read ahci(4) carefully. It has all possible references. If you think it
 is not enough, propose patches.
 
 It seems I miss ada(4) device and I cannot find it in 8.0 - not ada.ko nor 
 device ada.
 
 ada, same as da goes as part of cam module. It is not possible to load
 them separately now. But for kernel configuration it is separate option.

I think that part of what Euegene is said and what is confusing is that ahci.4
manual page has a cross-reference to ada.4, but the latter doesn't exist.  
Neither
as a distinct manual page nor as a link.

-- 
Andriy Gapon
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-19 Thread Alexandre Sunny Kovalenko
On Wed, 2009-11-18 at 01:30 +0200, Alexander Motin wrote:
 Feedbacks are welcome as always.
 
Works here (ThinkPad X60):

ahci0: Intel ICH7M AHCI SATA controller port
0x18d0-0x18d7,0x18c4-0x18c7,0x18c8-0x18cf,0x18c0-0x18c3,0x18b0-0x18bf
mem 0xee00-0xee4447ff irq 16 at device 31.2 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.10 with 4 1.5Gbps ports, Port Multiplier not supported
ahcich0: AHCI channel at channel 0 on ahci0

RabbitsDen# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32
RabbitsDen# 

Thank you for doing this work.

-- 
Alexandre Kovalenko (Олександр Коваленко)


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Eugene Grosbein
Alexander Motin wrote:
 Eugene Grosbein wrote:
 Alexander Motin wrote:

 Feedbacks are welcome as always.
 Today's RELENG_8 build is broken (my /usr/src is symlink to /usr/local/src):
 
 Can you try to update your sources again? ahci driver in 8-STABLE and
 HEAD are identical now and building fine in both, I've checked it
 yesterday.

I've updated again using cvsup.freebsd.org and now the problem has gone,
world builds just fine. It seems my local mirror had wrong moment for update
last night. Sorry for noise, I really should update again before posting.
Thanks!

Eugene Grosbein
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Ollivier Robert
According to Alexander Motin:
 Feedbacks are welcome as always.

Working fine from here, on a recent Dell T3500 with ICH8/ICH10 controllers 
(ATA/AHCI).
Thanks a lot!

Disks were renamed from ad{4,6,8} into ada{0,1,2}. I'm using a full-GPT-ZFS
setup here. ZFS mounted all pools w/o any issue and seems to be using the
gptids instead of the /dev/adNp3 partitions.  Swap is not on ZFS but I
added GPT labels with gpart and glabel added the /dev/gpt entries so swap
is fine too.

See below:

ahci0: Intel ICH10 AHCI SATA controller port
0xfe00-0xfe07,0xfe10-0xfe13,0xfe20-0xfe27,0xfe30-0xfe33,0xfec0-0xfedf mem
0xff97-0xff9707ff irq 20 at device 31.2 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.20 with 6 3Gbps ports, Port Multiplier not supported
ahcich0: AHCI channel at channel 0 on ahci0
ahcich0: [ITHREAD]
ahcich1: AHCI channel at channel 1 on ahci0
ahcich1: [ITHREAD]
ahcich2: AHCI channel at channel 2 on ahci0
ahcich2: [ITHREAD]
ahcich3: AHCI channel at channel 3 on ahci0
ahcich3: [ITHREAD]
ahcich4: AHCI channel at channel 4 on ahci0
ahcich4: [ITHREAD]
ahcich5: AHCI channel at channel 5 on ahci0
ahcich5: [ITHREAD]
...
(aprobe0:ahcich0:0:0:0): SIGNATURE: 
(aprobe1:ahcich1:0:0:0): SIGNATURE: 
(aprobe2:ahcich2:0:0:0): SIGNATURE: 
(aprobe3:ahcich3:0:0:0): SIGNATURE: eb14
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: ST3320418AS CC44 ATA/ATAPI-8 SATA 2.x device
ada0: 300.000MB/s transfers
ada0: Command Queueing enabled
ada0: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C)
cd0 at ahcich3 bus 0 scbus3 target 0 lun 0
cd0: PLDS DVD-ROM DH-16D5S VD15 Removable CD-ROM SCSI-0 device 
cd0: 150.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present -
tray closed

ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: ST3320418AS CC44 ATA/ATAPI-8 SATA 2.x device
ada1: 300.000MB/s transfers
ada1: Command Queueing enabled
ada1: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C)
ada2 at ahcich2 bus 0 scbus2 target 0 lun 0
ada2: ST3320418AS CC44 ATA/ATAPI-8 SATA 2.x device
ada2: 300.000MB/s transfers
ada2: Command Queueing enabled
ada2: 305245MB (625142448 512 byte sectors: 16H 63S/T 16383C)

411 [0:31] robe...@ng:~ swapinfo
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swap041943040  4194304 0%
/dev/gpt/swap141943040  4194304 0%
/dev/gpt/swap241943040  4194304 0%
Total125829120 12582912 0%

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Ollivier Robert
According to Jeremy Chadwick:
 I didn't have this problem.  System has AHCI in use, and the kernel is
 built to make use of modular atacore.  Specifically:
 
 # Modular ATA
 device  atacore # Core ATA functionality
 device  ataisa  # ISA bus support
 device  atapci  # PCI bus support; only generic chipset 
 support
 device  ataahci # AHCI SATA
 device  ataintel# Intel

Interesting.  My own kernel config file has the following and ahci.ko is
loaded by loader.conf.  Do I need to change my config to match your own?

ATA and ATAPI devices
device  ata
device  atadisk # ATA disk drives
device  atapicd # ATAPI CDROM drives
device  atapifd # ATAPI floppy drives
options ATA_STATIC_ID   # Static device numbering

# SCSI peripherals
device  scbus   # SCSI bus (required for SCSI)
device  da  # Direct Access (disks)
device  cd  # CD
device  pass# Passthrough device (direct SCSI access)
device  ses # SCSI Environmental Services (and SAF-TE)

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Eugene Grosbein
Jeremy Chadwick wrote:

 I didn't have this problem.  System has AHCI in use, and the kernel is
 built to make use of modular atacore.  Specifically:
 
 # Modular ATA
 device  atacore # Core ATA functionality
 device  ataisa  # ISA bus support
 device  atapci  # PCI bus support; only generic chipset 
 support
 device  ataahci # AHCI SATA
 device  ataintel# Intel

How should STABLE user (not tracking freebsd-current@) learn about CAM ATA 
configuration?
There is ahci(4) manual page in 8.0-PRERELEASE but no ada(4) that is linked 
here.

I've just tried Modular ATA configuration of Intel ICH7-based system plus 
device ahci
minus all traditional ata(4) kernel configuration, the kernel builds fine
but boot messages do not show any attempt to detect my SATA HDD,
so root mount just fails (I use GEOM UFS labels in my /etc/fstab).
Typing ? at mounroot prompt I see only daX devices standing for my USB 
cardreader
and no device for HDD.

It seems I miss ada(4) device and I cannot find it in 8.0 - not ada.ko nor 
device ada.

Eugene Grosbein
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Jeremy Chadwick
On Thu, Nov 19, 2009 at 10:18:32AM +0700, Eugene Grosbein wrote:
 Jeremy Chadwick wrote:
 
  I didn't have this problem.  System has AHCI in use, and the kernel is
  built to make use of modular atacore.  Specifically:
  
  # Modular ATA
  device  atacore # Core ATA functionality
  device  ataisa  # ISA bus support
  device  atapci  # PCI bus support; only generic chipset 
  support
  device  ataahci # AHCI SATA
  device  ataintel# Intel
 
 How should STABLE user (not tracking freebsd-current@) learn about CAM ATA 
 configuration?
 There is ahci(4) manual page in 8.0-PRERELEASE but no ada(4) that is linked 
 here.

I don't know.  I'm waiting for someone to actually write documentation
on this.  I keep seeing commits talking about ATA disks via CAM (e.g.
SCSI emulation for ATA disks), but the only thing I'm aware of that
exists is SCSI emulation for ATAPI devices.

 I've just tried Modular ATA configuration of Intel ICH7-based system plus 
 device ahci
 minus all traditional ata(4) kernel configuration, the kernel builds fine
 but boot messages do not show any attempt to detect my SATA HDD,
 so root mount just fails (I use GEOM UFS labels in my /etc/fstab).
 Typing ? at mounroot prompt I see only daX devices standing for my USB 
 cardreader
 and no device for HDD.

This sounds like a different problem.  You may want to talk to mav@
about this.

 It seems I miss ada(4) device and I cannot find it in 8.0 - not ada.ko nor 
 device ada.

Same.

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Adam Vande More

 I don't know.  I'm waiting for someone to actually write documentation
 on this.  I keep seeing commits talking about ATA disks via CAM (e.g.
 SCSI emulation for ATA disks), but the only thing I'm aware of that
 exists is SCSI emulation for ATAPI devices.

  I've just tried Modular ATA configuration of Intel ICH7-based system
 plus device ahci
  minus all traditional ata(4) kernel configuration, the kernel builds fine
  but boot messages do not show any attempt to detect my SATA HDD,
  so root mount just fails (I use GEOM UFS labels in my /etc/fstab).
  Typing ? at mounroot prompt I see only daX devices standing for my USB
 cardreader
  and no device for HDD.

 This sounds like a different problem.  You may want to talk to mav@
 about this.

  It seems I miss ada(4) device and I cannot find it in 8.0 - not ada.ko
 nor device ada.

 Same.


 To enable ahci, put ahci_load=YES into loader.conf.  Upon reboot, drives
will be detected as adaX eg

galacticdominator% dmesg |grep ada
GEOM_STRIPE: Disk ada3 attached to stripe0.
GEOM_STRIPE: Disk ada4 attached to stripe0.
a...@galacticdominator.com:/usr/obj/usr/src/sys/GENERIC amd64
ada0 at ahcich0 bus 0 target 0 lun 0
ada0: ST31000528AS CC37 ATA/ATAPI-8 SATA 2.x device
ada0: 300.000MB/s transfers
ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada0: Native Command Queueing enabled
ada1 at ahcich1 bus 0 target 0 lun 0
ada1: ST3750330AS SD15 ATA/ATAPI-8 SATA 2.x device
ada1: 300.000MB/s transfers
ada1: 715404MB (1465149168 512 byte sectors: 16H 63S/T 16383C)
ada1: Native Command Queueing enabled
ada2 at ahcich3 bus 0 target 0 lun 0
ada2: ST3500320AS AD14 ATA/ATAPI-8 SATA 2.x device
ada2: 300.000MB/s transfers
ada2: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
ada2: Native Command Queueing enabled
ada3 at ahcich4 bus 0 target 0 lun 0
ada3: ST3500320AS AD14 ATA/ATAPI-8 SATA 2.x device
ada3: 300.000MB/s transfers
ada3: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
ada3: Native Command Queueing enabled
ada4 at ahcich5 bus 0 target 0 lun 0
ada4: ST3750330AS SD15 ATA/ATAPI-8 SATA 2.x device
ada4: 300.000MB/s transfers
ada4: 715404MB (1465149168 512 byte sectors: 16H 63S/T 16383C)
ada4: Native Command Queueing enabled

BIOS must be set to ahci controller mode, and obviously both disk and
controller must support it.  This works fine off a GENERIC.

-- 
Adam Vande More
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Adam Vande More

  To enable ahci, put ahci_load=YES into loader.conf.  Upon reboot, drives
 will be detected as adaX eg

 galacticdominator% dmesg |grep ada
 GEOM_STRIPE: Disk ada3 attached to stripe0.
 GEOM_STRIPE: Disk ada4 attached to stripe0.
 a...@galacticdominator.com:/usr/obj/usr/src/sys/GENERIC amd64
 ada0 at ahcich0 bus 0 target 0 lun 0
 ada0: ST31000528AS CC37 ATA/ATAPI-8 SATA 2.x device

 ada0: 300.000MB/s transfers
 ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
 ada0: Native Command Queueing enabled
 ada1 at ahcich1 bus 0 target 0 lun 0
 ada1: ST3750330AS SD15 ATA/ATAPI-8 SATA 2.x device

 ada1: 300.000MB/s transfers
 ada1: 715404MB (1465149168 512 byte sectors: 16H 63S/T 16383C)
 ada1: Native Command Queueing enabled
 ada2 at ahcich3 bus 0 target 0 lun 0
 ada2: ST3500320AS AD14 ATA/ATAPI-8 SATA 2.x device

 ada2: 300.000MB/s transfers
 ada2: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
 ada2: Native Command Queueing enabled
 ada3 at ahcich4 bus 0 target 0 lun 0
 ada3: ST3500320AS AD14 ATA/ATAPI-8 SATA 2.x device
 ada3: 300.000MB/s transfers
 ada3: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
 ada3: Native Command Queueing enabled
 ada4 at ahcich5 bus 0 target 0 lun 0
 ada4: ST3750330AS SD15 ATA/ATAPI-8 SATA 2.x device
 ada4: 300.000MB/s transfers
 ada4: 715404MB (1465149168 512 byte sectors: 16H 63S/T 16383C)
 ada4: Native Command Queueing enabled

 BIOS must be set to ahci controller mode, and obviously both disk and
 controller must support it.  This works fine off a GENERIC.


Also note this can change loader mappings, so be sure to edit fstab if
necessary.

-- 
Adam Vande More
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-18 Thread Jeremy Chadwick
On Thu, Nov 19, 2009 at 12:11:26AM -0600, Adam Vande More wrote:
 
  I don't know.  I'm waiting for someone to actually write documentation
  on this.  I keep seeing commits talking about ATA disks via CAM (e.g.
  SCSI emulation for ATA disks), but the only thing I'm aware of that
  exists is SCSI emulation for ATAPI devices.
 
   I've just tried Modular ATA configuration of Intel ICH7-based system
  plus device ahci
   minus all traditional ata(4) kernel configuration, the kernel builds fine
   but boot messages do not show any attempt to detect my SATA HDD,
   so root mount just fails (I use GEOM UFS labels in my /etc/fstab).
   Typing ? at mounroot prompt I see only daX devices standing for my USB
  cardreader
   and no device for HDD.
 
  This sounds like a different problem.  You may want to talk to mav@
  about this.
 
   It seems I miss ada(4) device and I cannot find it in 8.0 - not ada.ko
  nor device ada.
 
  Same.
 
 
  To enable ahci, put ahci_load=YES into loader.conf.  Upon reboot, drives
 will be detected as adaX eg
 
 galacticdominator% dmesg |grep ada
 GEOM_STRIPE: Disk ada3 attached to stripe0.
 GEOM_STRIPE: Disk ada4 attached to stripe0.
 a...@galacticdominator.com:/usr/obj/usr/src/sys/GENERIC amd64
 ada0 at ahcich0 bus 0 target 0 lun 0
 ada0: ST31000528AS CC37 ATA/ATAPI-8 SATA 2.x device
 ada0: 300.000MB/s transfers
 ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
 ada0: Native Command Queueing enabled
 ada1 at ahcich1 bus 0 target 0 lun 0
 ada1: ST3750330AS SD15 ATA/ATAPI-8 SATA 2.x device
 ada1: 300.000MB/s transfers
 ada1: 715404MB (1465149168 512 byte sectors: 16H 63S/T 16383C)
 ada1: Native Command Queueing enabled
 ada2 at ahcich3 bus 0 target 0 lun 0
 ada2: ST3500320AS AD14 ATA/ATAPI-8 SATA 2.x device
 ada2: 300.000MB/s transfers
 ada2: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
 ada2: Native Command Queueing enabled
 ada3 at ahcich4 bus 0 target 0 lun 0
 ada3: ST3500320AS AD14 ATA/ATAPI-8 SATA 2.x device
 ada3: 300.000MB/s transfers
 ada3: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
 ada3: Native Command Queueing enabled
 ada4 at ahcich5 bus 0 target 0 lun 0
 ada4: ST3750330AS SD15 ATA/ATAPI-8 SATA 2.x device
 ada4: 300.000MB/s transfers
 ada4: 715404MB (1465149168 512 byte sectors: 16H 63S/T 16383C)
 ada4: Native Command Queueing enabled
 
 BIOS must be set to ahci controller mode, and obviously both disk and
 controller must support it.  This works fine off a GENERIC.

AHCI in the BIOS is enabled, AHCI in FreeBSD is in use.

Kernel configuration is below my .sig, ditto with dmesg.  World sources
are from ~45 minutes prior to kernel build date (2009/11/17 20:07 PST).

FreeBSD icarus.home.lan 8.0-PRERELEASE FreeBSD 8.0-PRERELEASE #0: Tue Nov 17 
20:07:21 PST 2009 
r...@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64  amd64

Like I said, this whole thing needs to get documented.

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

#
# Kernel configuration for the following system:
#
#   OS: RELENG_8
#   MB: Supermicro X7SBA
# arch: amd64
#

cpu HAMMER
ident   GENERIC

makeoptions DEBUG=-g# Build kernel with gdb(1) debug symbols

options SCHED_ULE   # ULE scheduler
options PREEMPTION  # Enable kernel thread preemption
options INET# InterNETworking
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL# Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
options NFSCLIENT   # Network Filesystem Client
options NFSSERVER   # Network Filesystem Server
options NFSLOCKD# Network Lock Manager
options NFS_ROOT# NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
options CD9660  # ISO 9660 Filesystem
options PROCFS  # Process filesystem (requires PSEUDOFS)
options PSEUDOFS# Pseudo-filesystem framework
options GEOM_PART_GPT   # GUID Partition Tables.
options GEOM_LABEL  # Provides labelization
options COMPAT_43TTY# BSD 4.3 TTY compat (sgtty)
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE  # ktrace(1) support
options STACK   

HEADS UP: major CAM ATA MFC

2009-11-17 Thread Alexander Motin
Hi.

I want to notice, that I've just merged from HEAD to 8-STABLE latest
results of my last months work on CAM-based ATA implementation and CAM
subsystem itself. Please contact me if you will have any problems,
questions, propositions, ...

What's done:
- major code cleanup. Many SCSIsms in ATA code removed, or reworked for
ATA specifics. Many ATA support parts reworked or newly implemented;
- CAM code took some fixes and optimizations. Luckily no major changes
were required yet.
- NCQ support re-factored. Same as for SCSI, non-capable devices now
limited by queue depth of 2, to let request sorter do it's job better.
- Port Multipliers support re-factored. Is is more stable now. Devices
hot-insert/remove supported. Implemented reinitialization after bus resets.
- ahci(4) and siis(4) drivers took many changes, including improved
timeout handling, error recovery and performance optimizations.
- added basic support for PATA transport. After ata(4) drivers wrapper
will be finished, it will allow to completely disable old ATA
infrastructure.
- camcontrol tool now reports more information about ATA devices and
supports ATA Power Management.
- added support for ATA devices with large sector size, declared by
ATA-7 spec (only theoretically now, I haven't seen such yet)
- added quirks mechanism for ATA, to allow, for example, to disable NCQ,
or later DMA, for specific device model or firmware revision,
- added support for DMA-incapable, and some old ATA devices;
- implemented ATA error reporting.

Things to be done yet:
- timeouts and hard errors recovery process with Port Multipliers used
can cause deadlocks if happen under heavy load. Any way it is a step
forward, as previously it just was not recovering at all.
- devices connected using Port Multipliers detected asynchronously, and
in some cases they may not get in time for root mounting.
- interface mode control possible only using loader tunables, but not
with camcontrol.
- NCQ is not used for devices with less tags supported then controller
capable (it is quite rare).

Many thanks to iXsystems Inc for supporting my work, making this all
possible. Also thanks to Vitsch Electronics, Sentex Corp, lissyara.su,
and many other people for hardware donations.

Feedbacks are welcome as always.

-- 
Alexander Motin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-17 Thread Eugene Grosbein
Alexander Motin wrote:

 Feedbacks are welcome as always.

Today's RELENG_8 build is broken (my /usr/src is symlink to /usr/local/src):

# make -j3 MODULES_WITH_WORLD=yes buildworld
[skip]
=== sys/modules/ahci (all)
cc -O2 -pipe -march=prescott -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE
 -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-gr
owth=100 --param large-function-growth=1000 -fno-common  -mno-align-long-strings
 -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
-ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wred
undant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointe
r-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /
usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 'ahci_timeout
':
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1286: error: 'struct ahci_
channel' has no member named 'fatalerr'
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 'ahci_end_tra
nsaction':
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1368: error: 'struct ahci_
channel' has no member named 'fatalerr'
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1384: error: 'struct ahci_
channel' has no member named 'fatalerr'
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1396: error: 'struct ahci_
channel' has no member named 'fatalerr'
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1405: error: 'struct ahci_
channel' has no member named 'fatalerr'
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1447: error: 'struct ahci_
channel' has no member named 'fatalerr'
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 'ahci_reset':
/usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1703: error: 'struct ahci_
channel' has no member named 'fatalerr'
*** Error code 1

Stop in /usr/local/src/sys/modules/ahci.
*** Error code 1

Stop in /usr/local/src/sys/modules.
*** Error code 1

Stop in /usr/local/src/sys.
*** Error code 1

Stop in /usr/local/src.
*** Error code 1

Stop in /usr/local/src.
*** Error code 1

Stop in /usr/local/src.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-17 Thread Jeremy Chadwick
I didn't have this problem.  System has AHCI in use, and the kernel is
built to make use of modular atacore.  Specifically:

# Modular ATA
device  atacore # Core ATA functionality
device  ataisa  # ISA bus support
device  atapci  # PCI bus support; only generic chipset support
device  ataahci # AHCI SATA
device  ataintel# Intel

Confirmation:

FreeBSD icarus.home.lan 8.0-PRERELEASE FreeBSD 8.0-PRERELEASE #0: Tue Nov 17 
20:07:21 PST 2009
r...@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_8_amd64  amd64

world/kernel built with make -j2 buildworld / make -j2 buildkernel.

csup last run against cvsup10.freebsd.org approximately 2 hours ago.  I
did notice a number of commits to ATA, XPT, CAM, etc. ~8-10 hours ago as
well, but even more ~2 hours ago.  I assume the delays are due to what
the cvsup master vs. mirrors have and how often they sync.

I'd recommend you re-csup with a different mirror and see if there are
any changes.

-- 
| Jeremy Chadwick   j...@parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

On Wed, Nov 18, 2009 at 01:04:37PM +0700, Eugene Grosbein wrote:
 Alexander Motin wrote:
 
  Feedbacks are welcome as always.
 
 Today's RELENG_8 build is broken (my /usr/src is symlink to /usr/local/src):
 
 # make -j3 MODULES_WITH_WORLD=yes buildworld
 [skip]
 === sys/modules/ahci (all)
 cc -O2 -pipe -march=prescott -fno-strict-aliasing -Werror -D_KERNEL 
 -DKLD_MODULE
  -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param 
 inline-unit-gr
 owth=100 --param large-function-growth=1000 -fno-common  
 -mno-align-long-strings
  -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 
 -mno-sse3
 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall 
 -Wred
 undant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
 -Wpointe
 r-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions 
 -c /
 usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 
 'ahci_timeout
 ':
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1286: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 
 'ahci_end_tra
 nsaction':
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1368: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1384: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1396: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1405: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1447: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c: In function 
 'ahci_reset':
 /usr/local/src/sys/modules/ahci/../../dev/ahci/ahci.c:1703: error: 'struct 
 ahci_
 channel' has no member named 'fatalerr'
 *** Error code 1
 
 Stop in /usr/local/src/sys/modules/ahci.
 *** Error code 1
 
 Stop in /usr/local/src/sys/modules.
 *** Error code 1
 
 Stop in /usr/local/src/sys.
 *** Error code 1
 
 Stop in /usr/local/src.
 *** Error code 1
 
 Stop in /usr/local/src.
 *** Error code 1
 
 Stop in /usr/local/src.
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-17 Thread Eugene Grosbein
Jeremy Chadwick wrote:
 I didn't have this problem.  System has AHCI in use, and the kernel is
 built to make use of modular atacore.  Specifically:

[skip]

 I'd recommend you re-csup with a different mirror and see if there are
 any changes.

I'll try. By the way, have you used MODULES_WITH_WORLD while building world?
RELENG_8 still has a couple of other problems with this knob, needed patches 
are:

-- sys/modules/dtrace/lockstat/Makefile.orig2009-09-16 23:05:25.0 
+0800
+++ sys/modules/dtrace/lockstat/Makefile2009-09-16 23:05:45.0 
+0800
@@ -5,7 +5,7 @@
 KMOD=  lockstat
 SRCS=  lockstat.c

-SRCS+= vnode_if.h
+SRCS+= vnode_if.h opt_kdtrace.h

 CFLAGS+=   -I${.CURDIR}/../../../cddl/compat/opensolaris \
-I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \

--- sys/modules/sysvipc/sysvmsg/Makefile.orig   2009-09-16 23:04:00.0 
+0800
+++ sys/modules/sysvipc/sysvmsg/Makefile2009-09-16 23:04:12.0 
+0800
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../../kern

 KMOD=  sysvmsg
-SRCS=  sysv_msg.c opt_sysvipc.h
+SRCS=  sysv_msg.c opt_sysvipc.h opt_compat.h

 .include bsd.kmod.mk
--- sys/modules/sysvipc/sysvsem/Makefile.orig   2009-09-16 23:02:02.0 
+0800
+++ sys/modules/sysvipc/sysvsem/Makefile2009-09-16 23:01:51.0 
+0800
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../../kern

 KMOD=  sysvsem
-SRCS=  sysv_sem.c opt_sysvipc.h
+SRCS=  sysv_sem.c opt_sysvipc.h opt_compat.h

 .include bsd.kmod.mk
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: HEADS UP: major CAM ATA MFC

2009-11-17 Thread Alexander Motin
Eugene Grosbein wrote:
 Alexander Motin wrote:
 
 Feedbacks are welcome as always.
 
 Today's RELENG_8 build is broken (my /usr/src is symlink to /usr/local/src):

Can you try to update your sources again? ahci driver in 8-STABLE and
HEAD are identical now and building fine in both, I've checked it
yesterday.

-- 
Alexander Motin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org