kern/157281: Add support to ahci for Marvell 88SE9172 (patch included)

Josh Carroll josh.carroll at gmail.com
Mon May 23 20:00:26 UTC 2011


>Number:         157281
>Category:       kern
>Synopsis:       Add support to ahci for Marvell 88SE9172 (patch included)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 23 20:00:19 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Josh Carroll
>Release:        8.2-RELEASE amd64
>Organization:
n/a
>Environment:
FreeBSD pflog.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0 r222170M: Sun May 22 01:32:51 PDT 2011     root at pflog.net:/usr/obj/usr/src/sys/PFLOG  amd64
>Description:
The secondary SATA controller on the Asus P8Z68-V pro motherboard is a Marvell 88SE9172.

This request is to add support to sys/dev/ahci/ahci.c for this motherboard. I added the following to ahci_ids[] modeling it after the entry for the 9182. The revision on this motherboard for the controller is 0x11 as reported by pciconf. Here is the additional entry to ahci_ids[]:

    {0x91721b4b, 0x11, "Marvell 88SE9172",  AHCI_Q_NOBSYRES},

After applying this update and booting with the new kernel, the controller is properly attached to ahci(4) and I can see devices on the controller and use them. Here is dmesg output with the above change:

ahci0: <Marvell 88SE9172 AHCI SATA controller> port 0xb040-0xb047,0xb030-0xb033,0xb020-0xb027,0xb010-0xb013,0xb000-0xb00f mem 0xfb810000-0xfb8101ff irq 19 at device 0.0 on pci9
ahci0: [ITHREAD]
ahci0: AHCI v1.00 with 2 6Gbps ports, Port Multiplier supported with FBS
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: [ITHREAD]
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich1: [ITHREAD]

And camcontrol devlist output for the controller:

scbus0 on ahcich0 bus 0:
<>                                 at scbus0 target -1 lun -1 ()
scbus1 on ahcich1 bus 0:
<WDC WD4000AAKS-00A7B0 01.03B01>   at scbus1 target 0 lun 0 (ada0,pass0)
<>                                 at scbus1 target -1 lun -1 ()

Here is the pciconf -lcvb output corresponding to this controller:

ahci0 at pci0:9:0:0:   class=0x010601 card=0x84771043 chip=0x91721b4b rev=0x11 hdr=0x00
    class      = mass storage
    subclass   = SATA
    bar   [10] = type I/O Port, range 32, base 0xb040, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0xb030, size  4, enabled
    bar   [18] = type I/O Port, range 32, base 0xb020, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0xb010, size  4, enabled
    bar   [20] = type I/O Port, range 32, base 0xb000, size 16, enabled
    bar   [24] = type Memory, range 32, base 0xfb810000, size 512, enabled
    cap 01[40] = powerspec 3  supports D0 D3  current D0
    cap 05[50] = MSI supports 1 message enabled with 1 message
    cap 10[70] = PCI-Express 2 legacy endpoint max data 128(512) link x1(x1)

I have not observed any adverse problems with the disk on the controller since I updated the kernel.  It seems to be working fine.
>How-To-Repeat:
Attempt to use a disk on the Marvell 88SE9172 controller without the attached patch, and the disk is not visible/usable.
>Fix:
See attached patch, adding the 88SE9172 to the ahci_ids[].

Patch attached with submission follows:

--- ahci.c.orig	2011-05-23 12:37:15.000000000 -0700
+++ ahci.c	2011-05-23 12:46:35.000000000 -0700
@@ -194,6 +194,7 @@
 	{0x91201b4b, 0x00, "Marvell 88SE912x",	AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES},
 	{0x91231b4b, 0x11, "Marvell 88SE912x",	AHCI_Q_NOBSYRES},
 	{0x91231b4b, 0x00, "Marvell 88SE912x",	AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES},
+	{0x91721b4b, 0x11, "Marvell 88SE9172",	AHCI_Q_NOBSYRES},
 	{0x91821b4b, 0x00, "Marvell 88SE9182",	AHCI_Q_NOBSYRES},
 	{0x06201103, 0x00, "HighPoint RocketRAID 620",	AHCI_Q_NOBSYRES},
 	{0x06201b4b, 0x00, "HighPoint RocketRAID 620",	AHCI_Q_NOBSYRES},


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list