From owner-freebsd-questions@freebsd.org Thu Sep 21 17:09:03 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5690BE127AF for ; Thu, 21 Sep 2017 17:09:03 +0000 (UTC) (envelope-from rrsum@summerhill.org) Received: from cody.summerhill.org (104-179-148-192.lightspeed.livnmi.sbcglobal.net [104.179.148.192]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cody.summerhill.org", Issuer "cody.summerhill.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 05F811585 for ; Thu, 21 Sep 2017 17:09:02 +0000 (UTC) (envelope-from rrsum@summerhill.org) Received: from imac.summerhill.org (imac.summerhill.org [192.168.1.4]) (authenticated bits=0) by cody.summerhill.org (8.15.2/8.15.2) with ESMTPSA id v8LGpZ5Z056871 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 21 Sep 2017 12:51:36 -0400 (EDT) (envelope-from rrsum@summerhill.org) From: Rick Summerhill Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: eSata cards and AHCI Message-Id: Date: Thu, 21 Sep 2017 12:51:35 -0400 To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 17:09:03 -0000 I=E2=80=99m having a problem with eSata cards and AHCI on a FreeBSD 11.0 = RELEASE test box. I=E2=80=99ve been running a generic dual port eSata = card from StarTech, with a 4 bay Mediasonic (port multiplier supported) = enclosure on one port and a single bay generic enclosure on the other. = Everything has worked fine with that configuration. However, I=E2=80=99m = trying replace the single bay enclosure with second 4 bay Mediasonic = enclosure. The StarTech card apparently doesn=E2=80=99t support two pmp = enclosures, so I=E2=80=99ve been experimenting with different eSata = cards. The current one is a Syba SD-PEX40049 2 port card based on the = ASM 1061 chipset. The original enclosure has 4 drives (in a zfs raidz = configuration) and the new enclosure has 3 drives. When the machine is booted, the bios on the eSata card sees all 7 disks = and reports them properly to the console, and in fewer than 2 seconds. After the reboot, none of the 7 drives appear in the machines device = list, although the card itself appears as ahci0 (see below for the = pertinent dmesg segments). Note also that FreeBSD itself is on = internal ufs drives, so the machine boots fine, it just doesn=E2=80=99t = see the drives in the two external enclosures. After logging in, I then run camcontrol reset 0 (actually, sometimes I = need to run it several times, and sometimes I need to run camcontrol = rescan 0), and finally the first four drives appear. Then camcontrol = reset 1 typically makes the other 3 drives appear. See the dmesg = segment below after running these commands. =46rom then on the machine = seems normal Here are my questions: 1. Is this a controller issue? 2. Is this an issue with the controller card? 3. If so, is there a recommended eSata card that works in this = configuration? Any help in debugging this would be greatly appreciated. Boot dmesg segments: ahci0: port = 0xe050-0xe057,0xe040-0xe043,0xe030-0xe037,0xe020-0xe023,0xe000-0xe01f = mem 0xf7d10000-0xf7d101ff irq 16 at device 0.0 on pci1 ahci0: AHCI v1.20 with 2 6Gbps ports, Port Multiplier supported ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 pmp0 at ahcich0 bus 0 scbus0 target 15 lun 0 pmp0: ATA device pmp0: 600.000MB/s transfers (SATA 3.x, NONE, PIO 8192bytes) pmp0: 15 fan-out ports pmp1 at ahcich1 bus 0 scbus1 target 15 lun 0 pmp1: ATA device pmp1: 600.000MB/s transfers (SATA 3.x, NONE, PIO 8192bytes) pmp1: 15 fan-out ports Running camcontrol devlist yields the following: at scbus0 target 15 lun 0 = (pass0,pmp0) at scbus1 target 15 lun 0 = (pass1,pmp1) dmesg after running camcontrol reset 0 and camcontrol reset 1: ahcich0: Timeout on slot 14 port 15 ahcich0: is 00800000 cs 00000000 ss 00000000 rs 00004000 tfd 1d0 serr = 00000000 cmd 0004cd17 (pmp0:ahcich0:0:15:0): WRITE_PM. ACB: e8 01 ff ff ff 02 00 00 00 00 ff = 00 (pmp0:ahcich0:0:15:0): CAM status: Command timeout (pmp0:ahcich0:0:15:0): Retrying command ada3 at ahcich0 bus 0 scbus0 target 0 lun 0 ada3: ATA8-ACS SATA 3.x device ada3: Serial Number 9WM5KLW7 ada3: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada3: Command Queueing enabled ada3: 1907729MB (3907029168 512 byte sectors) ada4 at ahcich0 bus 0 scbus0 target 2 lun 0 ada4: ATA8-ACS SATA 3.x device ada4: Serial Number 9WM47YFF ada4: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada4: Command Queueing enabled ada4: 1907729MB (3907029168 512 byte sectors) ada5 at ahcich0 bus 0 scbus0 target 1 lun 0 ada5: ATA8-ACS SATA 3.x device ada5: Serial Number Z1E0621D ada5: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada5: Command Queueing enabled ada5: 1907729MB (3907029168 512 byte sectors) ada5: quirks=3D0x1<4K> ada6 at ahcich0 bus 0 scbus0 target 3 lun 0 ada6: ATA8-ACS SATA 3.x device ada6: Serial Number Z2F03WHB ada6: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada6: Command Queueing enabled ada6: 1907729MB (3907029168 512 byte sectors) ada6: quirks=3D0x1<4K> ada7 at ahcich1 bus 0 scbus1 target 0 lun 0 ada7: ACS-2 ATA SATA 3.x device ada7: Serial Number Z4Z8EZFL ada7: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada7: Command Queueing enabled ada7: 1907729MB (3907029168 512 byte sectors) ada7: quirks=3D0x1<4K> ada8 at ahcich1 bus 0 scbus1 target 1 lun 0 ada8: ACS-3 ATA SATA 3.x device ada8: Serial Number ZDH1SYWE ada8: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada8: Command Queueing enabled ada8: 3815447MB (7814037168 512 byte sectors) ada8: quirks=3D0x1<4K> ada9 at ahcich1 bus 0 scbus1 target 2 lun 0 ada9: ATA8-ACS SATA 3.x device ada9: Serial Number Z9AFT5NM ada9: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada9: Command Queueing enabled ada9: 953869MB (1953525168 512 byte sectors) ada9: quirks=3D0x1<4K> --Rick -- Rick Summerhill Retired, Chief Technology Officer, Internet2 10233 Timberhill Rd Manchester, MI 48158 USA -- Home: 734-428-1422 Cell: 734-276-1904 Email: rrsum@summerhill.org Web: http://www.rick.summerhill.org