Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Oct 2016 16:57:11 +0000
From:      "D. E" <cipher_nl@hotmail.com>
To:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, "freebsd-hardware@freebsd.org" <freebsd-hardware@freebsd.org>
Subject:   DeLock 10x SATA AHCI controller not working properly
Message-ID:  <DB5PR08MB0664A32C3E670CE50F7AE74997AA0@DB5PR08MB0664.eurprd08.prod.outlook.com>

next in thread | raw e-mail | index | archive | help
Dear list,

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


*** Introduction

I have bought this very neat $80 SATA AHCI controller: http://www.delock.co=
m/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 e=
fficient, unlike SAS adapters which can use up to 8W when doing nothing. Th=
e 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 pus=
hes beyond 900MB/s when fully utilised.
The controller is detected by FreeBSD 11.0-RELEASE-p1 amd64 as a regular AH=
CI controller. It appears to work, in that it detects the disks that are co=
nnected to it and it can do I/O.


*** The problem

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

In other words, I believe this controller needs some kind of quirk. The con=
troller 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 sti=
ll 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 000000=
00 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 00000=
000 cmd 0004c317
(aprobe0:ahcich17:0:0:0): SETFEATURES SET TRANSFER MODE. ACB: ef 03 00 00 0=
0 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=3D0x010601 card=3D0x10601b21 chip=3D0x06251b21 rev=
=3D0x01 hdr=3D0x00
    vendor     =3D 'ASMedia Technology Inc.'
    class      =3D mass storage
    subclass   =3D 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 th=
e list, meaning that I cannot easily reply on your reply unless you also se=
nd it to my email directly, using 'Reply All'. Thanks!=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DB5PR08MB0664A32C3E670CE50F7AE74997AA0>