DeLock 10x SATA AHCI controller not working properly

"D. E" <[email protected]>
Newsgroups gmane.os.freebsd.devel.hardware,gmane.os.freebsd.current
Message-ID <DB5PR08MB0664A32C3E670CE50F7AE74997AA0@DB5PR08MB0664.eurprd08.prod.outlook.com>
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: http://www.delock.com/produkte/G_89384/merkmale.html
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 hdr=0x00
    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 pci4
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
          pci4
              pcib4 bus numbers:
                  4
            ahci1
                Interrupt request lines:
                    0x109
                pcib4 memory window:
                    0xfdafe000-0xfdafffff
              ahcich6
                  I/O memory addresses:
                      0xfdafe100-0xfdafe17f
              ahcich7
                  I/O memory addresses:
                      0xfdafe180-0xfdafe1ff
              ahcich10
                  I/O memory addresses:
                      0xfdafe300-0xfdafe37f
              ahcich11
                  I/O memory addresses:
                      0xfdafe380-0xfdafe3ff
              ahcich12
                  I/O memory addresses:
                      0xfdafe400-0xfdafe47f
              ahcich13
                  I/O memory addresses:
                      0xfdafe480-0xfdafe4ff
              ahcich14
                  I/O memory addresses:
                      0xfdafe500-0xfdafe57f
              ahcich15
                  I/O memory addresses:
                      0xfdafe580-0xfdafe5ff
              ahcich16
                  I/O memory addresses:
                      0xfdafe600-0xfdafe67f
              ahcich17
                  I/O memory addresses:
                      0xfdafe680-0xfdafe6ff


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!
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.