Project

General

Profile

Bug #3797

AHCI: Support for ASMedia ASM106x

Added by Marcel Telka almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2013-05-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

AHCI driver is unable to do port reset properly on this SATA AHCI Controller:

  • ASMedia Technology Inc. ASM1062 Serial ATA Controller
# cfgadm -y -x sata_reset_port sata1/0
cfgadm: Hardware specific failure: Driver ioctl failed I/O error
#

Several other SATA AHCI Controllers were tested and all of them are able to properly do the port reset (cfgadm completed without an error). These controllers were tested:

  • Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller
  • NVIDIA Corporation MCP78S [GeForce 8200] AHCI Controller
  • Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode]
  • Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
  • Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller
  • Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)

The difference seems to be that the ASM1062 offers "staggered spin-up" support via CAP.SSS = 1 (see AHCI specification), while all other tested AHCI controllers does not (CAP.SSS = 0 for them).

This issue could be easily tested/reproduced using this:

1. Identify your SATA HBAs:

  • run `scanpci`
  • run `cfgadm | grep sata./0`

2. Run this dtrace script:

# dtrace -n 'ahci_port_reset:entry {trace((1&((ahci_port_t *)arg1)->ahciport_flags) ? "SSS" : "no SSS")}' &

3. Reset first SATA port for all SATA HBA you have.

# cfgadm -y -x sata_reset_port sata0/0
# cfgadm -y -x sata_reset_port sata1/0
# ... etc

For example:

Step 1:

# scanpci | grep -i ata
 Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller
 ASMedia Technology Inc. ASM1062 Serial ATA Controller
# cfgadm | grep sata./0
sata0/0::dsk/c6t0d0            disk         connected    configured   ok
sata1/0                        sata-port    disconnected unconfigured failed
#

Okay, I have two SATA HBA: sata0 and sata1.

Step 2:

# dtrace -n 'ahci_port_reset:entry {trace((1&((ahci_port_t *)arg1)->ahciport_flags) ? "SSS" : "no SSS")}' &
dtrace: description 'ahci_port_reset:entry ' matched 1 probe

Step 3:

# cfgadm -y -x sata_reset_port sata0/0
#   3  48644            ahci_port_reset:entry   no SSS

# cfgadm -y -x sata_reset_port sata1/0
cfgadm: Hardware specific failure: Driver ioctl failed I/O error

#   3  48644            ahci_port_reset:entry   SSS

The ahci_port_reset function is failing at line 5355 here:

5345    /*
5346     * A COMINIT signal is supposed to be received
5347     * PxSERR.DIAG.X or PxIS.PCS should be set
5348     */
5349    if (!(port_intr_status & AHCI_INTR_STATUS_PCS) &&
5350        !(port_serror & SERROR_EXCHANGED_ERR)) {
5351        cmn_err(CE_WARN, "!ahci%d: ahci_port_reset port %d " 
5352            "COMINIT signal from the device not received",
5353            instance, port);
5354        AHCIPORT_SET_STATE(ahci_portp, addrp, SATA_PSTATE_FAILED);
5355        return (AHCI_FAILURE);
5356    }

Related issues

Related to illumos gate - Bug #3815: AHCI: Support for Marvell 88SE9128ResolvedMarcel Telka2013-06-14

Actions
Has duplicate illumos gate - Bug #3099: AMD hudson D3 AHCI supportClosed2012-08-20

Actions

Also available in: Atom PDF