Dear list,

I hope you guys can help me with my new AHCI controller that doesn't work well 
with FreeBSD yet.

*** Introduction

I have bought this very neat $80 SATA AHCI controller:
This controller is PCI-express 2.0 with 2 lanes, so 1GB/s bandwidth shared 
across 10 ports. For just $80 this is a great deal! It is also VERY power 
efficient, unlike SAS adapters which can use up to 8W when doing nothing. The 
controller itself it a 2-port Asmedia AHCI SATA controller with two port 
multipliers on it. Thus, each 5 ports are sharing one SATA/600 link. It pushes 
beyond 900MB/s when fully utilised.
The controller is detected by FreeBSD 11.0-RELEASE-p1 amd64 as a regular AHCI 
controller. It appears to work, in that it detects the disks that are connected 
to it and it can do I/O.

*** The problem

This controller generates various I/O errors and timeouts. But only in specific 
circumstances, where I think that NCQ or simultaneous access is a factor. 
Because when i start a simple dd read command for each harddrive connected to 
the controller, there are no errors or timeouts in the dmesg. But when 
importing a pool, creating a pool or scrubbing a pool that is empty, timeouts 
and I/O errors are 100% reproducable in just a few seconds. This is after dd 
commands have been running for hours straight without any hickup.

In other words, I believe this controller needs some kind of quirk. The 
controller is reported to be working properly on Linux.

*** What I already tried

I tried disabling MSI and MSI-X interrupts. I tried disabling NCQ although with 
limited effect: ZFS can be tuned to use one outstanding I/O, but I still got 
errors now and then.
Is there any way of doing some easy quirks to localize the problem and also get 
this controller working reliably, albeit slower?

*** Example errors when working with ZFS:

ahcich7: Timeout on slot 23 port 0
ahcich7: is 00000000 cs 00000000 ss 00000000 rs 00800000 tfd 50 serr 00000000 
cmd 0004cf17
(ada9:ahcich7:0:0:0): READ_DMA. ACB: c8 00 00 ff 02 40 00 00 00 00 00 00
(ada9:ahcich7:0:0:0): CAM status: Command timeout
(ada9:ahcich7:0:0:0): Retrying command
ahcich17: Timeout on slot 30 port 0
ahcich17: is 00000000 cs 00000000 ss 00000000 rs 40000000 tfd 50 serr 00000000 
cmd 0004c317
(aprobe0:ahcich17:0:0:0): SETFEATURES SET TRANSFER MODE. ACB: ef 03 00 00 00 40 
00 00 00 00 46 00
(aprobe0:ahcich17:0:0:0): CAM status: Command timeout
(aprobe0:ahcich17:0:0:0): Retrying command

*** Detection logs:

# pciconf -lv
ahci1@pci0:4:0:0:       class=0x010601 card=0x10601b21 chip=0x06251b21 rev=0x01 
    vendor     = 'ASMedia Technology Inc.'
    class      = mass storage
    subclass   = SATA

# dmesg
pci4: <ACPI PCI bus> on pcib4
ahci1: <AHCI SATA controller> mem 0xfdafe000-0xfdafffff irq 16 at device 0.0 on 
ahci1: AHCI v1.31 with 12 6Gbps ports, Port Multiplier not supported
ahcich6: <AHCI channel> at channel 0 on ahci1
ahcich7: <AHCI channel> at channel 1 on ahci1
ahcich10: <AHCI channel> at channel 4 on ahci1
ahcich11: <AHCI channel> at channel 5 on ahci1
ahcich12: <AHCI channel> at channel 6 on ahci1
ahcich13: <AHCI channel> at channel 7 on ahci1
ahcich14: <AHCI channel> at channel 8 on ahci1
ahcich15: <AHCI channel> at channel 9 on ahci1
ahcich16: <AHCI channel> at channel 10 on ahci1
ahcich17: <AHCI channel> at channel 11 on ahci1

# devinfo -r
              pcib4 bus numbers:
                Interrupt request lines:
                pcib4 memory window:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:
                  I/O memory addresses:

PS. please click 'Reply All' when replying, since I am not subscribed to the 
list, meaning that I cannot easily reply on your reply unless you also send it 
to my email directly, using 'Reply All'. Thanks!
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to