Project

General

Profile

Actions

Feature #9815

closed

Want basic AHCI enclosure services

Added by Robert Mustacchi about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
driver - device drivers
Start date:
2018-09-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

We'd like to add basic support leveraging the AHCI enclosure services which is an optional, standardized means of controlling various parts of the system. This provides basic support and a tool to drive it. Follow up work will be done to integrate it with FM for systems that have these configurations.

This adds a private tool /usr/lib/ahci/ahciem to drive this. For example:


[root@haswell ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
[root@haswell ~]# /usr/lib/ahci/ahciem ahci0/1
PORT                 ACTIVE       SUPPORTED
ahci0/1              default      ident,fault,default
[root@haswell ~]# /usr/lib/ahci/ahciem ahci0/1 ahci0/3
PORT                 ACTIVE       SUPPORTED
ahci0/1              default      ident,fault,default
ahci0/3              default      ident,fault,default
[root@haswell ~]# /usr/lib/ahci/ahciem ahci0
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
[root@haswell ~]# /usr/lib/ahci/ahciem ahci0/0 foo
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahciem: failed to find ahci enclosure port "foo" 
[root@haswell ~]# echo $?
1
[root@haswell ~]# /usr/lib/ahci/ahciem -s ident ahci0/0
[root@haswell ~]# /usr/lib/ahci/ahciem -s fault ahci0/1
[root@haswell ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              ident        ident,fault,default
ahci0/1              fault        ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default
[root@haswell ~]# /usr/lib/ahci/ahciem -s default ahci0
[root@haswell ~]# /usr/lib/ahci/ahciem 
PORT                 ACTIVE       SUPPORTED
ahci0/0              default      ident,fault,default
ahci0/1              default      ident,fault,default
ahci0/2              default      ident,fault,default
ahci0/3              default      ident,fault,default
ahci0/4              default      ident,fault,default
ahci0/5              default      ident,fault,default

I've tested this so far on three different generations of systems:

  • An SMCI x9 based system (1s Ivy Bridge)
  • An SMCI x10 based system (1s Haswell)
  • An SMCI x11 based system (2s Skylake)

For each, I verified that we could control the LEDs of all the ports that have disks in them. I also went through and took a dump when completed to make sure that there were no memory leaks.


Related issues

Related to illumos gate - Feature #11576: Want support for ahci LED entries in topoClosed

Actions
Related to illumos gate - Bug #11892: ahciem doesn't properly check if enclosure services are presentClosedRobert Mustacchi

Actions
Actions #1

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed

git commit fd6d41c5025e9fb45a115fc82d86e9983d1e9fd6

commit  fd6d41c5025e9fb45a115fc82d86e9983d1e9fd6
Author: Robert Mustacchi <rm@joyent.com>
Date:   2018-09-22T15:54:14.000Z

    9815 Want basic AHCI enclosure services
    Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    Reviewed by: Rob Johnston <rob.johnston@joyent.com>
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions #2

Updated by Robert Mustacchi over 4 years ago

  • Related to Feature #11576: Want support for ahci LED entries in topo added
Actions #3

Updated by Robert Mustacchi about 4 years ago

  • Related to Bug #11892: ahciem doesn't properly check if enclosure services are present added
Actions

Also available in: Atom PDF