From sacadmin Sun Oct 14 22:37:21 2007
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9F5bLHk024680;
	Sun, 14 Oct 2007 22:37:21 -0700 (PDT)
Received: (from eh146360@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id l9F5bLc2024676;
	Sun, 14 Oct 2007 22:37:21 -0700 (PDT)
Date: Sun, 14 Oct 2007 22:37:21 -0700 (PDT)
From: En-Hua Cecilia Hu <eh146360@sac.sfbay.sun.com>
Message-Id: <200710150537.l9F5bLc2024676@sac.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Cc: fw-mpt@sun.com
Subject: Serial Attached SCSI (SAS) Management Protocol (SMP) support for Solaris [PSARC/2007/595 FastTrack timeout 10/21/2007]
Status: RO
Content-Length: 644


Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2007 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Serial Attached SCSI (SAS) Management Protocol (SMP) support for Solaris
    1.2. Name of Document Author/Supplier:
	 Author:  Javen Wu, River Li,  Dolpher Du, James Mcpherson
    1.3  Date of This Document:
	14 October, 2007
4. Technical Description
    See the case directory for more detail

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


From sacadmin Mon Oct 15 03:02:10 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca [129.145.155.42])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9FA2Auu029059
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 03:02:10 -0700 (PDT)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l9F9wn4V004992
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 02:58:49 -0700 (PDT)
Received: from fe-apac-06.sun.com (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l9F9whx1007484
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 09:58:43 GMT
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JPY00F01696H500@mail-apac.sun.com>
 (original mail from Cecilia.Hu@Sun.COM) for psarc@sac.sfbay.sun.com; Mon,
 15 Oct 2007 17:58:43 +0800 (SGT)
Received: from [129.158.218.120] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JPY00HE76DUYNJS@mail-apac.sun.com>; Mon,
 15 Oct 2007 17:58:43 +0800 (SGT)
Date: Mon, 15 Oct 2007 17:58:44 +0800
From: Cecilia Hu <Cecilia.Hu@Sun.COM>
Subject: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol (SMP)
 support for Solaris
Sender: Cecilia.Hu@Sun.COM
To: psarc@sac.sfbay.sun.com
Cc: fw-mpt@Sun.COM
Reply-to: Cecilia.Hu@Sun.COM
Message-id: <471339D4.8070006@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
User-Agent: Thunderbird 1.5.0.8 (X11/20061204)
Status: RO
Content-Length: 18046

I'm sponsoring this fast-track for Javen Wu, River Li, Dolpher Du and James 
Mcpherson.  The requested release binding is Micro, the timer is set to
10/21/2007.

- Cecilia




Fasttrack:   PSARC/2007/595
Name:        Serial Attached SCSI (SAS) Management Protocol (SMP) support
              for Solaris
Submitters:  Javen Wu, River Li, Dolpher Du, James Mcpherson

1) Background
-------------

The Serial Attached SCSI (SAS) is the next generation of the SCSI protocol.
The Serial Management Protocol (SMP) is a component protocol of SAS
which defines the management standard used by SMP initiator to
communicate with SMP target. SAS based Host Bus Adapters (HBAs) usually
function as a SMP initiator to transport SMP requests and responses.

SAS expanders are devices similar to switches in the Fibre Channel and
Ethernet protocols. And in the context of SAS, they become the proxies of
SMP targets that respond SMP requests. The primary role of SMP is to allow
the host or the initiator to monitor and control SMP target devices.

SMP defines a suite of management functions and their invocations between
initiators/targets are through request/response frame format messages. The
document proposes a new driver smp(7D) in Solaris to interact with SAS
expanders.

At present there is no equivalent to the uscsi(7I) passthru interface which
allows Solaris to manage SAS expander devices and SAS domains from userland
applications. We propose to add an SMP analog to uscsi(7I), called usmp(7I)
which will enable userland applications and utilities to perform SMP
management tasks.

The LSI SAS chips driven by the mpt(7D) has the ability to communicate with
SAS expander through SMP. The first phase of the  proposal will also enhance
the mpt(7D) driver to support SMP as a proof of the proposed interface.


2) Proposal Summary
-------------------

To provide SMP target device access, SMP target devices attach via SAS
HBA instances (such as mpt(7D)) and are operable via usmp(7I). To achieve
this we extend the SCSA framework and request that SAS HBA drivers implement
SMP management functions. Please refer to the figure below figure 1: Basic
Achitecture Model Diagram.

                +--------------------------------------+
                | SMP specific library or application  |
                +--------------------------------------+
                                   |
                                   V usmp(7I) / ioctl()
                                   |
                                   |                  USER
          =========================|============================
                                   |                  KERNEL
                                   v
                         +===================+
                         | SMP Target Driver |
                         +===================+
                                   ^
                                   | sas_*() kernel functions
                                   v
                        +----------------------+
                        | SCSA Frameworks with |
                        |    SAS extension     |
                        +----------------------+
                                   ^
                                   | SAS HBA driver transport
                                   | extension vector.
                                   | (sas_hba_tran_ext)
                                   v
                        +---------------------+
                        | SAS HBA Driver with |
                        | the extension for   |
                        | sas_hba_tran_ext.   |
                        | eg. mpt(7D)         |
                        +---------------------+

               Figure 1: Basic Architecture Model Diagram


3) Proposal Details
-------------------

3.1) smp(7D) and usmp(7I)

      The smp(7D) target driver supports SMP targets such as expanders and
      SAS switches. The smp(7D) driver supports the ioctl(2) system call
      to provide an interface for userlevel applications which wish to
      manage an individual SMP target device.

      The usmp(7I) interface will be exported by smp(7D).

      #include <sys/scsi/impl/usmp.h>

      ioctl(int fildes, int request, struct usmp_cmd *cmd);

      usmp_cmd structure is defined in <sys/scsi/impl/usmp.h> and includes
      the following members:

         caddr_t         usmp_req;       /* The address of SMP request frame */
         caddr_t         usmp_rsp;       /* The address of SMP response frame */
         size_t          usmp_reqsize;   /* The length of request frame */
         size_t          usmp_rspsize;   /* The length of response frame */
         int             usmp_timeout;   /* Request timeout */

      The members of the usmp_cmd  structure  have  the  following
      meanings:

      usmp_req and usmp_rsp are the pointers to the SMP request frame and
      SMP response frame sturctures.

      usmp_timeout is time in seconds to allow for completion of the SMP
      function. The default value is 60 seconds.

      The structure for SMP request frame and SMP response frame are defined
      in <sys/scsi/generic/smp_frames.h>

      The SMP request frame structure names usmp_req and includes following
      members:

         uint8_t         smpo_frametype; /* 40h is SMP request frame */
         uint8_t         smpo_function;  /* SMP function */
         uint8_t         smpo_reserved;
         uint8_t         smpo_reqsize;   /* request frame length */
         uint8_t         smpo_msgframe[1];

      The SMP response frame structure names usmp_rsp and includes following
      members:

         uint8_t         smpi_frametype; /* 41h is SMP response frame */
         uint8_t         smpi_function;  /* SMP function */
         uint8_t         smpi_result;
         uint8_t         smpi_rspsize;   /* response frame length */
         uint8_t         smpi_msgframe[1];

      The usmp command is very powerful, but somewhat dangerous, and  so its
      use is restricted to processes running as account with
      PRIV_SYS_DEVICES privilege, regardless of the file permissions on the
      device node.

      The details please refer to manpages in case directory.

3.2) /dev and /device naming

      smp(7D) creates device nodes in /devices with node names of the format
      "smp@wSASADDR,PHYSPORT" and minor name of "smp". The SASADDR is a 16
      character (64bit hex) SAS World Wide Address, PHSYPORT is the physical
      port ID of the HBA that the SMP target is attached to. An expander
      might appear as:

      /devices/pci@0,0/pci10de,5d@d/pci1000,3150@0/smp@w5001636000005aff\
      ,4:smp

      According to the SAS specification, legal SAS topologies prohibit on
      SAS address from being discovered twice via the same port. The combination
      of a SASADDR and PHYSPORT uniquely identifies an SMP device.

      This project delivers a devfsadm(1M) link module which creates appropriate
      links in /dev that point to the device node under /devices. The link
      module creates an entry under /dev/smp/expd? for each SMP target
      device node which is detected by Solaris.

      To continue the above example, devfsadm will create the link

      /dev/smp/expd0 -> ../../devices/pci@0,0/pci10de,5d@d/pci1000,3150@0 \
      /smp@w5001636000005aff,4:smp

3.3) SCSA extension for SMP transport


      The proposal enhances the SCSA framework to support the SMP transport
      service. The kernel structures and functions detailed below will be
      found in <sys/scsi/impl/sas_transport.h>

      sas_addr - defines the address component of a SMP target device

         uint8_t                a_wwn[8];        /* expander wwn */
         uint32_t               a_pport;         /* physical port */
         struct scsi_hba_tran   *a_hba_tran;     /* transport vectors */

      smp_pkt - defines the SMP function transport packet structure

         caddr_t                pkt_req;         /* the address of SMP
                                                    request frame */
         caddr_t                pkt_rsp;         /* the address of SMP
                                                    response frame */
         size_t                 pkt_reqsize;     /* the length of
                                                    request frame */
         size_t                 pkt_rspsize;     /* the length of
                                                    response frame */
         int                    pkt_timeout;     /* the time allocated
                                                    to complete SMP
                                                    request */
         uchar_t                pkt_reason;      /* reson completion
                                                    called */
         struct sas_addr *pkt_address;           /* packet destination */

      smp_device - kernel struct, which stores common information about
      each SMP target device.

         dev_info_t            *dip;             /* Cross-reference to
                                                    dev_info_t */
         struct sas_addr       smp_addr;         /* the sas address of
                                                    the SMP target device */

3.3.1) sas_smp_transport - request by SMP target driver to start a
        SMP request.

        int sas_smp_transport(struct smp_pkt *pktp);

        The SMP target driver uses sas_smp_transport() to request that the
        HBA driver transfer an SMP request packet to a specific SMP target
        device. sas_smp_transport() waits for the SMP request to complete
        and for the SMP response to return from the specific SMP target.

3.3.2) sas_smp_probe - default SAS HBA probe function for SMP target
        device only.

        int sas_smp_probe(struct smp_device *smp_devp);

        sas_smp_probe() is a kernel function for probing the existence
        of a specific SMP target device described in the smp_device
        structure. sas_smp_probe() sends the SMP function REPORT GENERAL
        to a specific sas address from specific port to detect the
        presence of a SMP target device.

3.3.3) sas_ifgetcap - get SMP transport capability.

        int sas_ifgetcap(struct sas_addr *ap,  char *capstr);

        sas_ifgetcap() is a kernel function used by SMP target driver
        to get the capability of the SAS HBA driver.

        so far only one capability is defined:

        smp-crc   CRC  generating capability that is supported by
                  HBA: 0 means HBA has no capability to generate
                  CRC by itself. 1 means HBA handle CRC by itself.
                  if HBA driver return 0, SMP target driver will
                  generate CRC bytes for user's SMP request frame.

3.3.4) sas_hba_lookup_capstr - return index matching capability
        string

        int sas_hba_lookup_capstr(char *capstr);

        sas_hba_lookup_capstr()  function  attempts  to  match
        capstr  against a known set of capability strings. If found,
        the defined index for the matched capability is returned.

3.4) scsi_hba_tran(7S) extension

      tran_extension is a void type pointer which is added to
      scsi_hba_tran(7S) as extension for specific HBA operations. In
      this proposal, we point tran_extension to sas_hba_tran_ext in order
      to support SMP.

3.5) struct sas_hba_tran_ext

      sas_hba_tran_ext structure is a kernel structure providing the
      semantics of tran_extension of scsi_hba_tran(7S). sas_hba_tran_ext
      defines vectors that an SAS HBA driver exports to SCSA interfaces
      for SMP transport so that SAS HBA specific function can be executed.
      In fact, sas_hba_tran_ext is a extension of scsi_hba_tran(9S). The
      associated struct sas_hba_tran_ext includes the following two members:

          int (*tran_sas_getcap)(
              struct sas_addr         *ap,
              char                    *cap);

          int (*tran_smp_start)(
              struct smp_pkt          *pkt);

      tran_sas_getcap                  Function entry that retrieves a SAS
                                       capability. The entry point is similar
                                       to tran_getcap() function of
                                       scsi_hba_tran(9S)

      tran_smp_start                   Function entry that starts a SMP
                                       request execution on the SAS HBA
                                       hardware. The entry point is similar
                                       to the tran_start() function of
                                       scsi_hba_tran(9S).

3.6) SAS HBA driver extension

      To support SMP functions, each SAS HBA driver must provide functions
      in addition to those required for traditional SCSI device I/O. Phase
      1 of this project enhances the mpt(7D) driver to support SMP functions
      as detailed below:

3.6.1) implementation for sas_hba_tran_ext vector

        The tran_sas_getcap() and tran_smp_start() interfaces have to
        be implemented by SAS HBA driver. In this proposal, mpt(7D)
        will be enhanced to implement the tran_sas_getcap() and
        tran_smp_start() functions.

3.6.2) SMP targets automatic enumeration

        When a SAS HBA target driver supports SMP functions, the driver
        will enumerate all attached SMP targets automatically. Phase 1
        of this project enhances mpt(7D) to automatically detect and
        enumerate SMP target devices in Solaris.

3.6.3) SMP targets dynamic reconfiguration

        The changes to mpt(7D) for Phase 1 (and other SAS HBAs for later
        phases) require the driver to be aware of status changes between
        the host and the attached SMP target device. When there is a change
        the HBA driver will online or offline the SMP target instances
        automatically without the needs of reboot or manually invoke
        devfsadm(1M).

3.7) We also define two new common functions for converting the string
      representation of a devid to a 64bit SAS address:

      int      devid_str_to_wwn(const char *string, uint64_t *wwn)
      int      ddi_devid_str_to_wwn(const char *string, uint64_t *wwn);


4) Interface Summary and Commitment Levels
------------------------------------------

|-----------------------------------------------------------------------------|
| Interface Name          | Commitment   |           Comments                 |
+-------------------------+--------------+------------------------------------+
|                         |              |                                    |
|  smp(7D)                |  Cons. Priv. | Driver name for SMP target         |
|                         |              | devices.(Typically, SAS expander   |
|                         |              | devices)                           |
|                         |              |                                    |
|  usmp(7I                |  Cons. Priv. | Driver exports this interface      |
|                         |              | allowing user passthrough SMP      |
|                         |              | function request to SMP target     |
|                         |              | Devices from user-level.           |
|                         |              |                                    |
|  /usr/lib/devfsadm/     |              |                                    |
|  linkmod/SUNW_smp_link  |  Cons. Priv. | devfsadm link generation module    |
|                         |              |                                    |
|  /dev/smp/expd?         |  Cons. Priv. | Repository for link to SMP devices |
|                         |              |                                    |
|  ddi_sas_smp            |  Cons. Priv. | minor nodetype for device minor    |
|                         |              | nodes created by smp(7D)           |
|                         |              |                                    |
|  ddi_devid_str_to_wwn() |  Cons. Priv. | DDI function for convert a string  |
|                         |              | to 64 bits SAS address             |
|                         |              |                                    |
|  devid_str_to_wwn()     |  Cons. Priv. | function of libdevid library       |
|                         |              |                                    |
|  sas_*()                |  Proj. Priv  | kernel functions for smp transport |
|                         |              | service in SCSA                    |
|                         |              |                                    |
|  tran_extension         |  Cons. Priv. | scsi_hba_tran_t struct member for  |
|                         |              | extending scsi_hba_tran(9S)        |
|                         |              |                                    |
|  sas_hba_tran_ext       |  Proj. Priv. | SAS HBA driver transport extension |
|                         |              | vector struct. sas_hba_tran_ext    |
|                         |              | instantiate tran_extension of      |
|                         |              | scsi_hba_tran_t.                   |
|                         |              |                                    |
+-----------------------------------------------------------------------------+


5) References
-------------

PSARC 2001/401 MPT driver (message passing technology)
PSARC 2006/703 MPxIO extension for Serial Attached SCSI (SAS) on mpt(7D)
PSARC/2004/504 Common Devid/GUID Encode Interfaces for SCSI Devices
PSARC/1999/525 GENERIC SCSI PASS THROUGH FOR SOLARIS
PSARC/1993/259 SCSI HBA interface
LSI Fusion-MPT Message Passing Interface Specification v1.5.2
Serial Attached SCSI (SAS)
(http://www.t10.org/ftp/t10/drafts/sas/sas-r05.pdf)
Serial Attached SCSI - 1.1 (SAS-1.1)
(http://www.t10.org/ftp/t10/drafts/sas1/sas1r10.pdf)
Serial Attached SCSI - 2 (SAS-2)
(http://www.t10.org/ftp/t10/drafts/sas2/sas2r11.pdf


From sacadmin Mon Oct 15 08:31:24 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca [129.145.155.42])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9FFVOpf003886
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 08:31:24 -0700 (PDT)
Received: from sca-es-mail-1.sun.com (sca-es-mail-1.Sun.COM [192.18.43.132])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l9FFS4vA026168
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 08:28:04 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l9FFRwJK002631
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 08:27:58 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JPY00C01LFLFJ00@fe-sfbay-09.sun.com> (original mail from gdamore@sun.com)
 for psarc@sac.sfbay.sun.com; Mon, 15 Oct 2007 08:27:58 -0700 (PDT)
Received: from [192.168.251.11] ([76.174.83.55])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JPY00GBHLMB9600@fe-sfbay-09.sun.com>; Mon,
 15 Oct 2007 08:27:48 -0700 (PDT)
Date: Mon, 15 Oct 2007 08:25:09 -0700
From: "Garrett D'Amore" <gdamore@sun.com>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <471339D4.8070006@sun.com>
Sender: Garrett.Damore@sun.com
To: Cecilia.Hu@sun.com
Cc: psarc@sac.sfbay.sun.com, fw-mpt@sun.com
Message-id: <47138655.1050208@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
References: <471339D4.8070006@sun.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070827)
Status: RO
Content-Length: 18940

Cecilia Hu wrote:
> I'm sponsoring this fast-track for Javen Wu, River Li, Dolpher Du and 
> James Mcpherson.  The requested release binding is Micro, the timer is 
> set to
> 10/21/2007.

It *looks* like this is a closed case?  Is that intentional?  If there 
is not information here which is proprietary, I'd really like to see it 
opened up.

    -- Garrett
>
> - Cecilia
>
>
>
>
> Fasttrack:   PSARC/2007/595
> Name:        Serial Attached SCSI (SAS) Management Protocol (SMP) support
>              for Solaris
> Submitters:  Javen Wu, River Li, Dolpher Du, James Mcpherson
>
> 1) Background
> -------------
>
> The Serial Attached SCSI (SAS) is the next generation of the SCSI 
> protocol.
> The Serial Management Protocol (SMP) is a component protocol of SAS
> which defines the management standard used by SMP initiator to
> communicate with SMP target. SAS based Host Bus Adapters (HBAs) usually
> function as a SMP initiator to transport SMP requests and responses.
>
> SAS expanders are devices similar to switches in the Fibre Channel and
> Ethernet protocols. And in the context of SAS, they become the proxies of
> SMP targets that respond SMP requests. The primary role of SMP is to 
> allow
> the host or the initiator to monitor and control SMP target devices.
>
> SMP defines a suite of management functions and their invocations between
> initiators/targets are through request/response frame format messages. 
> The
> document proposes a new driver smp(7D) in Solaris to interact with SAS
> expanders.
>
> At present there is no equivalent to the uscsi(7I) passthru interface 
> which
> allows Solaris to manage SAS expander devices and SAS domains from 
> userland
> applications. We propose to add an SMP analog to uscsi(7I), called 
> usmp(7I)
> which will enable userland applications and utilities to perform SMP
> management tasks.
>
> The LSI SAS chips driven by the mpt(7D) has the ability to communicate 
> with
> SAS expander through SMP. The first phase of the  proposal will also 
> enhance
> the mpt(7D) driver to support SMP as a proof of the proposed interface.
>
>
> 2) Proposal Summary
> -------------------
>
> To provide SMP target device access, SMP target devices attach via SAS
> HBA instances (such as mpt(7D)) and are operable via usmp(7I). To achieve
> this we extend the SCSA framework and request that SAS HBA drivers 
> implement
> SMP management functions. Please refer to the figure below figure 1: 
> Basic
> Achitecture Model Diagram.
>
>                +--------------------------------------+
>                | SMP specific library or application  |
>                +--------------------------------------+
>                                   |
>                                   V usmp(7I) / ioctl()
>                                   |
>                                   |                  USER
>          =========================|============================
>                                   |                  KERNEL
>                                   v
>                         +===================+
>                         | SMP Target Driver |
>                         +===================+
>                                   ^
>                                   | sas_*() kernel functions
>                                   v
>                        +----------------------+
>                        | SCSA Frameworks with |
>                        |    SAS extension     |
>                        +----------------------+
>                                   ^
>                                   | SAS HBA driver transport
>                                   | extension vector.
>                                   | (sas_hba_tran_ext)
>                                   v
>                        +---------------------+
>                        | SAS HBA Driver with |
>                        | the extension for   |
>                        | sas_hba_tran_ext.   |
>                        | eg. mpt(7D)         |
>                        +---------------------+
>
>               Figure 1: Basic Architecture Model Diagram
>
>
> 3) Proposal Details
> -------------------
>
> 3.1) smp(7D) and usmp(7I)
>
>      The smp(7D) target driver supports SMP targets such as expanders and
>      SAS switches. The smp(7D) driver supports the ioctl(2) system call
>      to provide an interface for userlevel applications which wish to
>      manage an individual SMP target device.
>
>      The usmp(7I) interface will be exported by smp(7D).
>
>      #include <sys/scsi/impl/usmp.h>
>
>      ioctl(int fildes, int request, struct usmp_cmd *cmd);
>
>      usmp_cmd structure is defined in <sys/scsi/impl/usmp.h> and includes
>      the following members:
>
>         caddr_t         usmp_req;       /* The address of SMP request 
> frame */
>         caddr_t         usmp_rsp;       /* The address of SMP response 
> frame */
>         size_t          usmp_reqsize;   /* The length of request frame */
>         size_t          usmp_rspsize;   /* The length of response 
> frame */
>         int             usmp_timeout;   /* Request timeout */
>
>      The members of the usmp_cmd  structure  have  the  following
>      meanings:
>
>      usmp_req and usmp_rsp are the pointers to the SMP request frame and
>      SMP response frame sturctures.
>
>      usmp_timeout is time in seconds to allow for completion of the SMP
>      function. The default value is 60 seconds.
>
>      The structure for SMP request frame and SMP response frame are 
> defined
>      in <sys/scsi/generic/smp_frames.h>
>
>      The SMP request frame structure names usmp_req and includes 
> following
>      members:
>
>         uint8_t         smpo_frametype; /* 40h is SMP request frame */
>         uint8_t         smpo_function;  /* SMP function */
>         uint8_t         smpo_reserved;
>         uint8_t         smpo_reqsize;   /* request frame length */
>         uint8_t         smpo_msgframe[1];
>
>      The SMP response frame structure names usmp_rsp and includes 
> following
>      members:
>
>         uint8_t         smpi_frametype; /* 41h is SMP response frame */
>         uint8_t         smpi_function;  /* SMP function */
>         uint8_t         smpi_result;
>         uint8_t         smpi_rspsize;   /* response frame length */
>         uint8_t         smpi_msgframe[1];
>
>      The usmp command is very powerful, but somewhat dangerous, and  
> so its
>      use is restricted to processes running as account with
>      PRIV_SYS_DEVICES privilege, regardless of the file permissions on 
> the
>      device node.
>
>      The details please refer to manpages in case directory.
>
> 3.2) /dev and /device naming
>
>      smp(7D) creates device nodes in /devices with node names of the 
> format
>      "smp@wSASADDR,PHYSPORT" and minor name of "smp". The SASADDR is a 16
>      character (64bit hex) SAS World Wide Address, PHSYPORT is the 
> physical
>      port ID of the HBA that the SMP target is attached to. An expander
>      might appear as:
>
>      /devices/pci@0,0/pci10de,5d@d/pci1000,3150@0/smp@w5001636000005aff\
>      ,4:smp
>
>      According to the SAS specification, legal SAS topologies prohibit on
>      SAS address from being discovered twice via the same port. The 
> combination
>      of a SASADDR and PHYSPORT uniquely identifies an SMP device.
>
>      This project delivers a devfsadm(1M) link module which creates 
> appropriate
>      links in /dev that point to the device node under /devices. The link
>      module creates an entry under /dev/smp/expd? for each SMP target
>      device node which is detected by Solaris.
>
>      To continue the above example, devfsadm will create the link
>
>      /dev/smp/expd0 -> 
> ../../devices/pci@0,0/pci10de,5d@d/pci1000,3150@0 \
>      /smp@w5001636000005aff,4:smp
>
> 3.3) SCSA extension for SMP transport
>
>
>      The proposal enhances the SCSA framework to support the SMP 
> transport
>      service. The kernel structures and functions detailed below will be
>      found in <sys/scsi/impl/sas_transport.h>
>
>      sas_addr - defines the address component of a SMP target device
>
>         uint8_t                a_wwn[8];        /* expander wwn */
>         uint32_t               a_pport;         /* physical port */
>         struct scsi_hba_tran   *a_hba_tran;     /* transport vectors */
>
>      smp_pkt - defines the SMP function transport packet structure
>
>         caddr_t                pkt_req;         /* the address of SMP
>                                                    request frame */
>         caddr_t                pkt_rsp;         /* the address of SMP
>                                                    response frame */
>         size_t                 pkt_reqsize;     /* the length of
>                                                    request frame */
>         size_t                 pkt_rspsize;     /* the length of
>                                                    response frame */
>         int                    pkt_timeout;     /* the time allocated
>                                                    to complete SMP
>                                                    request */
>         uchar_t                pkt_reason;      /* reson completion
>                                                    called */
>         struct sas_addr *pkt_address;           /* packet destination */
>
>      smp_device - kernel struct, which stores common information about
>      each SMP target device.
>
>         dev_info_t            *dip;             /* Cross-reference to
>                                                    dev_info_t */
>         struct sas_addr       smp_addr;         /* the sas address of
>                                                    the SMP target 
> device */
>
> 3.3.1) sas_smp_transport - request by SMP target driver to start a
>        SMP request.
>
>        int sas_smp_transport(struct smp_pkt *pktp);
>
>        The SMP target driver uses sas_smp_transport() to request that the
>        HBA driver transfer an SMP request packet to a specific SMP target
>        device. sas_smp_transport() waits for the SMP request to complete
>        and for the SMP response to return from the specific SMP target.
>
> 3.3.2) sas_smp_probe - default SAS HBA probe function for SMP target
>        device only.
>
>        int sas_smp_probe(struct smp_device *smp_devp);
>
>        sas_smp_probe() is a kernel function for probing the existence
>        of a specific SMP target device described in the smp_device
>        structure. sas_smp_probe() sends the SMP function REPORT GENERAL
>        to a specific sas address from specific port to detect the
>        presence of a SMP target device.
>
> 3.3.3) sas_ifgetcap - get SMP transport capability.
>
>        int sas_ifgetcap(struct sas_addr *ap,  char *capstr);
>
>        sas_ifgetcap() is a kernel function used by SMP target driver
>        to get the capability of the SAS HBA driver.
>
>        so far only one capability is defined:
>
>        smp-crc   CRC  generating capability that is supported by
>                  HBA: 0 means HBA has no capability to generate
>                  CRC by itself. 1 means HBA handle CRC by itself.
>                  if HBA driver return 0, SMP target driver will
>                  generate CRC bytes for user's SMP request frame.
>
> 3.3.4) sas_hba_lookup_capstr - return index matching capability
>        string
>
>        int sas_hba_lookup_capstr(char *capstr);
>
>        sas_hba_lookup_capstr()  function  attempts  to  match
>        capstr  against a known set of capability strings. If found,
>        the defined index for the matched capability is returned.
>
> 3.4) scsi_hba_tran(7S) extension
>
>      tran_extension is a void type pointer which is added to
>      scsi_hba_tran(7S) as extension for specific HBA operations. In
>      this proposal, we point tran_extension to sas_hba_tran_ext in order
>      to support SMP.
>
> 3.5) struct sas_hba_tran_ext
>
>      sas_hba_tran_ext structure is a kernel structure providing the
>      semantics of tran_extension of scsi_hba_tran(7S). sas_hba_tran_ext
>      defines vectors that an SAS HBA driver exports to SCSA interfaces
>      for SMP transport so that SAS HBA specific function can be executed.
>      In fact, sas_hba_tran_ext is a extension of scsi_hba_tran(9S). The
>      associated struct sas_hba_tran_ext includes the following two 
> members:
>
>          int (*tran_sas_getcap)(
>              struct sas_addr         *ap,
>              char                    *cap);
>
>          int (*tran_smp_start)(
>              struct smp_pkt          *pkt);
>
>      tran_sas_getcap                  Function entry that retrieves a SAS
>                                       capability. The entry point is 
> similar
>                                       to tran_getcap() function of
>                                       scsi_hba_tran(9S)
>
>      tran_smp_start                   Function entry that starts a SMP
>                                       request execution on the SAS HBA
>                                       hardware. The entry point is 
> similar
>                                       to the tran_start() function of
>                                       scsi_hba_tran(9S).
>
> 3.6) SAS HBA driver extension
>
>      To support SMP functions, each SAS HBA driver must provide functions
>      in addition to those required for traditional SCSI device I/O. Phase
>      1 of this project enhances the mpt(7D) driver to support SMP 
> functions
>      as detailed below:
>
> 3.6.1) implementation for sas_hba_tran_ext vector
>
>        The tran_sas_getcap() and tran_smp_start() interfaces have to
>        be implemented by SAS HBA driver. In this proposal, mpt(7D)
>        will be enhanced to implement the tran_sas_getcap() and
>        tran_smp_start() functions.
>
> 3.6.2) SMP targets automatic enumeration
>
>        When a SAS HBA target driver supports SMP functions, the driver
>        will enumerate all attached SMP targets automatically. Phase 1
>        of this project enhances mpt(7D) to automatically detect and
>        enumerate SMP target devices in Solaris.
>
> 3.6.3) SMP targets dynamic reconfiguration
>
>        The changes to mpt(7D) for Phase 1 (and other SAS HBAs for later
>        phases) require the driver to be aware of status changes between
>        the host and the attached SMP target device. When there is a 
> change
>        the HBA driver will online or offline the SMP target instances
>        automatically without the needs of reboot or manually invoke
>        devfsadm(1M).
>
> 3.7) We also define two new common functions for converting the string
>      representation of a devid to a 64bit SAS address:
>
>      int      devid_str_to_wwn(const char *string, uint64_t *wwn)
>      int      ddi_devid_str_to_wwn(const char *string, uint64_t *wwn);
>
>
> 4) Interface Summary and Commitment Levels
> ------------------------------------------
>
> |-----------------------------------------------------------------------------| 
>
> | Interface Name          | Commitment   |           
> Comments                 |
> +-------------------------+--------------+------------------------------------+ 
>
> |                         |              
> |                                    |
> |  smp(7D)                |  Cons. Priv. | Driver name for SMP 
> target         |
> |                         |              | devices.(Typically, SAS 
> expander   |
> |                         |              | 
> devices)                           |
> |                         |              
> |                                    |
> |  usmp(7I                |  Cons. Priv. | Driver exports this 
> interface      |
> |                         |              | allowing user passthrough 
> SMP      |
> |                         |              | function request to SMP 
> target     |
> |                         |              | Devices from 
> user-level.           |
> |                         |              
> |                                    |
> |  /usr/lib/devfsadm/     |              
> |                                    |
> |  linkmod/SUNW_smp_link  |  Cons. Priv. | devfsadm link generation 
> module    |
> |                         |              
> |                                    |
> |  /dev/smp/expd?         |  Cons. Priv. | Repository for link to SMP 
> devices |
> |                         |              
> |                                    |
> |  ddi_sas_smp            |  Cons. Priv. | minor nodetype for device 
> minor    |
> |                         |              | nodes created by 
> smp(7D)           |
> |                         |              
> |                                    |
> |  ddi_devid_str_to_wwn() |  Cons. Priv. | DDI function for convert a 
> string  |
> |                         |              | to 64 bits SAS 
> address             |
> |                         |              
> |                                    |
> |  devid_str_to_wwn()     |  Cons. Priv. | function of libdevid 
> library       |
> |                         |              
> |                                    |
> |  sas_*()                |  Proj. Priv  | kernel functions for smp 
> transport |
> |                         |              | service in 
> SCSA                    |
> |                         |              
> |                                    |
> |  tran_extension         |  Cons. Priv. | scsi_hba_tran_t struct 
> member for  |
> |                         |              | extending 
> scsi_hba_tran(9S)        |
> |                         |              
> |                                    |
> |  sas_hba_tran_ext       |  Proj. Priv. | SAS HBA driver transport 
> extension |
> |                         |              | vector struct. 
> sas_hba_tran_ext    |
> |                         |              | instantiate tran_extension 
> of      |
> |                         |              | 
> scsi_hba_tran_t.                   |
> |                         |              
> |                                    |
> +-----------------------------------------------------------------------------+ 
>
>
>
> 5) References
> -------------
>
> PSARC 2001/401 MPT driver (message passing technology)
> PSARC 2006/703 MPxIO extension for Serial Attached SCSI (SAS) on mpt(7D)
> PSARC/2004/504 Common Devid/GUID Encode Interfaces for SCSI Devices
> PSARC/1999/525 GENERIC SCSI PASS THROUGH FOR SOLARIS
> PSARC/1993/259 SCSI HBA interface
> LSI Fusion-MPT Message Passing Interface Specification v1.5.2
> Serial Attached SCSI (SAS)
> (http://www.t10.org/ftp/t10/drafts/sas/sas-r05.pdf)
> Serial Attached SCSI - 1.1 (SAS-1.1)
> (http://www.t10.org/ftp/t10/drafts/sas1/sas1r10.pdf)
> Serial Attached SCSI - 2 (SAS-2)
> (http://www.t10.org/ftp/t10/drafts/sas2/sas2r11.pdf
>


From sacadmin Mon Oct 15 13:59:30 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca [129.145.155.42])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9FKxUmE014874
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 13:59:30 -0700 (PDT)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l9FKu8NT029978
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 13:56:09 -0700 (PDT)
Received: from fe-apac-06.sun.com (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l9FKu3G5021043
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 20:56:03 GMT
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JPZ00L010SBU000@mail-apac.sun.com>
 (original mail from James.McPherson@Sun.COM) for psarc@sac.sfbay.sun.com; Tue,
 16 Oct 2007 04:56:03 +0800 (SGT)
Received: from [10.7.251.162] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JPZ00H420T8YH1I@mail-apac.sun.com>; Tue,
 16 Oct 2007 04:56:03 +0800 (SGT)
Date: Tue, 16 Oct 2007 06:55:53 +1000
From: "James C. McPherson" <James.McPherson@Sun.COM>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <47138655.1050208@sun.com>
Sender: James.McPherson@Sun.COM
To: "Garrett D'Amore" <gdamore@Sun.COM>
Cc: Cecilia.Hu@Sun.COM, psarc@sac.sfbay.sun.com, fw-mpt@Sun.COM
Reply-to: James.McPherson@Sun.COM
Message-id: <4713D3D9.3070002@Sun.COM>
Organization: Sun Microsystems
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=UTF-8
Content-transfer-encoding: 7BIT
References: <471339D4.8070006@sun.com> <47138655.1050208@sun.com>
User-Agent: Thunderbird 2.0.0.6 (X11/20070802)
Status: RO
Content-Length: 591

Garrett D'Amore wrote:
> Cecilia Hu wrote:
>> I'm sponsoring this fast-track for Javen Wu, River Li, Dolpher Du and 
>> James Mcpherson.  The requested release binding is Micro, the timer is 
>> set to
>> 10/21/2007.
> 
> It *looks* like this is a closed case?  Is that intentional?  If there 
> is not information here which is proprietary, I'd really like to see it 
> opened up.


Hi Garrett,
no, this is definitely an open fasttrack. What
are you looking at which makes it appear to be
closed?



thankyou,
James C. McPherson
--
Senior Kernel Software Engineer, Solaris
Sun Microsystems

From sacadmin Mon Oct 15 15:15:08 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca [129.145.155.42])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9FMF8DO016522
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 15:15:08 -0700 (PDT)
Received: from sca-es-mail-2.sun.com (sca-es-mail-2.Sun.COM [192.18.43.133])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l9FMBl3K023301
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 15:11:47 -0700 (PDT)
Received: from fe-sfbay-10.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l9FMBgZH015133
	for <psarc@sac.sfbay.sun.com>; Mon, 15 Oct 2007 15:11:42 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JPZ00M011FFQH00@fe-sfbay-10.sun.com> (original mail from gdamore@sun.com)
 for psarc@sac.sfbay.sun.com; Mon, 15 Oct 2007 14:11:42 -0700 (PDT)
Received: from [192.168.251.11] ([76.174.83.55])
 by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JPZ0069C1JIQ640@fe-sfbay-10.sun.com>; Mon,
 15 Oct 2007 14:11:42 -0700 (PDT)
Date: Mon, 15 Oct 2007 14:09:04 -0700
From: "Garrett D'Amore" <gdamore@sun.com>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <4713D3D9.3070002@Sun.COM>
Sender: Garrett.Damore@sun.com
To: James.McPherson@sun.com
Cc: Cecilia.Hu@sun.com, psarc@sac.sfbay.sun.com, fw-mpt@sun.com
Message-id: <4713D6F0.7090902@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=UTF-8
Content-transfer-encoding: 7BIT
References: <471339D4.8070006@sun.com> <47138655.1050208@sun.com>
 <4713D3D9.3070002@Sun.COM>
User-Agent: Thunderbird 2.0.0.4 (X11/20070827)
Status: RO
Content-Length: 805

It was sent to psarc@sac.sfbay, rather than psarc-ext@sun.com.

It lacks the "Exposure:" attribute, indicating that it is an open case.

    -- Garrett

James C. McPherson wrote:
> Garrett D'Amore wrote:
>> Cecilia Hu wrote:
>>> I'm sponsoring this fast-track for Javen Wu, River Li, Dolpher Du 
>>> and James Mcpherson.  The requested release binding is Micro, the 
>>> timer is set to
>>> 10/21/2007.
>>
>> It *looks* like this is a closed case?  Is that intentional?  If 
>> there is not information here which is proprietary, I'd really like 
>> to see it opened up.
>
>
> Hi Garrett,
> no, this is definitely an open fasttrack. What
> are you looking at which makes it appear to be
> closed?
>
>
>
> thankyou,
> James C. McPherson
> -- 
> Senior Kernel Software Engineer, Solaris
> Sun Microsystems


From Cecilia.Hu@Sun.COM Mon Oct 15 19:55:37 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9G2taAv022777
	for <psarc-ext@sac.sfbay.Sun.COM>; Mon, 15 Oct 2007 19:55:37 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l9G2qDPK003613;
	Tue, 16 Oct 2007 10:52:14 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JPZ00I01HB14X00@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 15 Oct 2007 19:52:13 -0700 (PDT)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JPZ0092UHAZXY60@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 15 Oct 2007 19:52:12 -0700 (PDT)
Received: from fe-apac-05.sun.com
 (fe-apac-05.sun.com [192.18.19.176] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l9G2qB6X006263; Tue,
 16 Oct 2007 02:52:11 +0000 (GMT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JPZ00L01HACN400@mail-apac.sun.com>
 (original mail from Cecilia.Hu@Sun.COM); Tue, 16 Oct 2007 10:52:11 +0800 (SGT)
Received: from [129.158.218.120] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JPZ00901HAXO2MV@mail-apac.sun.com>; Tue,
 16 Oct 2007 10:52:11 +0800 (SGT)
Date: Tue, 16 Oct 2007 10:52:09 +0800
From: Cecilia Hu <Cecilia.Hu@Sun.COM>
Subject: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol (SMP)
 support for Solaris
Sender: Cecilia.Hu@Sun.COM
To: psarc-ext@Sun.COM
Cc: Javen Wu <javen.wu@Sun.COM>, yongfeng du <Yongfeng.Du@Sun.COM>,
        Ming Li <River.Li@Sun.COM>, James.McPherson@Sun.COM,
        Greg.Price@Sun.COM, Eric Schrock <Eric.Schrock@Sun.COM>,
        Michael.Shapiro@Sun.COM, Keith M Wesolowski <Keith.Wesolowski@Sun.COM>
Reply-to: Cecilia.Hu@Sun.COM
Message-id: <47142759.1060106@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
User-Agent: Thunderbird 1.5.0.8 (X11/20061204)
Status: RO
Content-Length: 18168

< Resend to psarc-ext@sun.com ... Please send your comments following up
   this email. Sorry for the duplicated mails. ]

I'm sponsoring this fast-track for Javen Wu, River Li, Dolpher Du and James
Mcpherson.  The requested release binding is Micro, the timer is set to
10/21/2007.

-Cecilia




Fasttrack:   PSARC/2007/595
Name:        Serial Attached SCSI (SAS) Management Protocol (SMP) support
              for Solaris
Submitters:  Javen Wu, River Li, Dolpher Du, James Mcpherson

1) Background
-------------

The Serial Attached SCSI (SAS) is the next generation of the SCSI protocol.
The Serial Management Protocol (SMP) is a component protocol of SAS
which defines the management standard used by SMP initiator to
communicate with SMP target. SAS based Host Bus Adapters (HBAs) usually
function as a SMP initiator to transport SMP requests and responses.

SAS expanders are devices similar to switches in the Fibre Channel and
Ethernet protocols. And in the context of SAS, they become the proxies of
SMP targets that respond SMP requests. The primary role of SMP is to allow
the host or the initiator to monitor and control SMP target devices.

SMP defines a suite of management functions and their invocations between
initiators/targets are through request/response frame format messages. The
document proposes a new driver smp(7D) in Solaris to interact with SAS
expanders.

At present there is no equivalent to the uscsi(7I) passthru interface which
allows Solaris to manage SAS expander devices and SAS domains from userland
applications. We propose to add an SMP analog to uscsi(7I), called usmp(7I)
which will enable userland applications and utilities to perform SMP
management tasks.

The LSI SAS chips driven by the mpt(7D) has the ability to communicate with
SAS expander through SMP. The first phase of the  proposal will also enhance
the mpt(7D) driver to support SMP as a proof of the proposed interface.


2) Proposal Summary
-------------------

To provide SMP target device access, SMP target devices attach via SAS
HBA instances (such as mpt(7D)) and are operable via usmp(7I). To achieve
this we extend the SCSA framework and request that SAS HBA drivers implement
SMP management functions. Please refer to the figure below figure 1: Basic
Achitecture Model Diagram.

                +--------------------------------------+
                | SMP specific library or application  |
                +--------------------------------------+
                                   |
                                   V usmp(7I) / ioctl()
                                   |
                                   |                  USER
          =========================|============================
                                   |                  KERNEL
                                   v
                         +===================+
                         | SMP Target Driver |
                         +===================+
                                   ^
                                   | sas_*() kernel functions
                                   v
                        +----------------------+
                        | SCSA Frameworks with |
                        |    SAS extension     |
                        +----------------------+
                                   ^
                                   | SAS HBA driver transport
                                   | extension vector.
                                   | (sas_hba_tran_ext)
                                   v
                        +---------------------+
                        | SAS HBA Driver with |
                        | the extension for   |
                        | sas_hba_tran_ext.   |
                        | eg. mpt(7D)         |
                        +---------------------+

               Figure 1: Basic Architecture Model Diagram


3) Proposal Details
-------------------

3.1) smp(7D) and usmp(7I)

      The smp(7D) target driver supports SMP targets such as expanders and
      SAS switches. The smp(7D) driver supports the ioctl(2) system call
      to provide an interface for userlevel applications which wish to
      manage an individual SMP target device.

      The usmp(7I) interface will be exported by smp(7D).

      #include <sys/scsi/impl/usmp.h>

      ioctl(int fildes, int request, struct usmp_cmd *cmd);

      usmp_cmd structure is defined in <sys/scsi/impl/usmp.h> and includes
      the following members:

         caddr_t         usmp_req;       /* The address of SMP request frame */
         caddr_t         usmp_rsp;       /* The address of SMP response frame */
         size_t          usmp_reqsize;   /* The length of request frame */
         size_t          usmp_rspsize;   /* The length of response frame */
         int             usmp_timeout;   /* Request timeout */

      The members of the usmp_cmd  structure  have  the  following
      meanings:

      usmp_req and usmp_rsp are the pointers to the SMP request frame and
      SMP response frame sturctures.

      usmp_timeout is time in seconds to allow for completion of the SMP
      function. The default value is 60 seconds.

      The structure for SMP request frame and SMP response frame are defined
      in <sys/scsi/generic/smp_frames.h>

      The SMP request frame structure names usmp_req and includes following
      members:

         uint8_t         smpo_frametype; /* 40h is SMP request frame */
         uint8_t         smpo_function;  /* SMP function */
         uint8_t         smpo_reserved;
         uint8_t         smpo_reqsize;   /* request frame length */
         uint8_t         smpo_msgframe[1];

      The SMP response frame structure names usmp_rsp and includes following
      members:

         uint8_t         smpi_frametype; /* 41h is SMP response frame */
         uint8_t         smpi_function;  /* SMP function */
         uint8_t         smpi_result;
         uint8_t         smpi_rspsize;   /* response frame length */
         uint8_t         smpi_msgframe[1];

      The usmp command is very powerful, but somewhat dangerous, and  so its
      use is restricted to processes running as account with
      PRIV_SYS_DEVICES privilege, regardless of the file permissions on the
      device node.

      The details please refer to manpages in case directory.

3.2) /dev and /device naming

      smp(7D) creates device nodes in /devices with node names of the format
      "smp@wSASADDR,PHYSPORT" and minor name of "smp". The SASADDR is a 16
      character (64bit hex) SAS World Wide Address, PHSYPORT is the physical
      port ID of the HBA that the SMP target is attached to. An expander
      might appear as:

      /devices/pci@0,0/pci10de,5d@d/pci1000,3150@0/smp@w5001636000005aff\
      ,4:smp

      According to the SAS specification, legal SAS topologies prohibit on
      SAS address from being discovered twice via the same port. The combination
      of a SASADDR and PHYSPORT uniquely identifies an SMP device.

      This project delivers a devfsadm(1M) link module which creates appropriate
      links in /dev that point to the device node under /devices. The link
      module creates an entry under /dev/smp/expd? for each SMP target
      device node which is detected by Solaris.

      To continue the above example, devfsadm will create the link

      /dev/smp/expd0 -> ../../devices/pci@0,0/pci10de,5d@d/pci1000,3150@0 \
      /smp@w5001636000005aff,4:smp

3.3) SCSA extension for SMP transport


      The proposal enhances the SCSA framework to support the SMP transport
      service. The kernel structures and functions detailed below will be
      found in <sys/scsi/impl/sas_transport.h>

      sas_addr - defines the address component of a SMP target device

         uint8_t                a_wwn[8];        /* expander wwn */
         uint32_t               a_pport;         /* physical port */
         struct scsi_hba_tran   *a_hba_tran;     /* transport vectors */

      smp_pkt - defines the SMP function transport packet structure

         caddr_t                pkt_req;         /* the address of SMP
                                                    request frame */
         caddr_t                pkt_rsp;         /* the address of SMP
                                                    response frame */
         size_t                 pkt_reqsize;     /* the length of
                                                    request frame */
         size_t                 pkt_rspsize;     /* the length of
                                                    response frame */
         int                    pkt_timeout;     /* the time allocated
                                                    to complete SMP
                                                    request */
         uchar_t                pkt_reason;      /* reson completion
                                                    called */
         struct sas_addr *pkt_address;           /* packet destination */

      smp_device - kernel struct, which stores common information about
      each SMP target device.

         dev_info_t            *dip;             /* Cross-reference to
                                                    dev_info_t */
         struct sas_addr       smp_addr;         /* the sas address of
                                                    the SMP target device */

3.3.1) sas_smp_transport - request by SMP target driver to start a
        SMP request.

        int sas_smp_transport(struct smp_pkt *pktp);

        The SMP target driver uses sas_smp_transport() to request that the
        HBA driver transfer an SMP request packet to a specific SMP target
        device. sas_smp_transport() waits for the SMP request to complete
        and for the SMP response to return from the specific SMP target.

3.3.2) sas_smp_probe - default SAS HBA probe function for SMP target
        device only.

        int sas_smp_probe(struct smp_device *smp_devp);

        sas_smp_probe() is a kernel function for probing the existence
        of a specific SMP target device described in the smp_device
        structure. sas_smp_probe() sends the SMP function REPORT GENERAL
        to a specific sas address from specific port to detect the
        presence of a SMP target device.

3.3.3) sas_ifgetcap - get SMP transport capability.

        int sas_ifgetcap(struct sas_addr *ap,  char *capstr);

        sas_ifgetcap() is a kernel function used by SMP target driver
        to get the capability of the SAS HBA driver.

        so far only one capability is defined:

        smp-crc   CRC  generating capability that is supported by
                  HBA: 0 means HBA has no capability to generate
                  CRC by itself. 1 means HBA handle CRC by itself.
                  if HBA driver return 0, SMP target driver will
                  generate CRC bytes for user's SMP request frame.

3.3.4) sas_hba_lookup_capstr - return index matching capability
        string

        int sas_hba_lookup_capstr(char *capstr);

        sas_hba_lookup_capstr()  function  attempts  to  match
        capstr  against a known set of capability strings. If found,
        the defined index for the matched capability is returned.

3.4) scsi_hba_tran(7S) extension

      tran_extension is a void type pointer which is added to
      scsi_hba_tran(7S) as extension for specific HBA operations. In
      this proposal, we point tran_extension to sas_hba_tran_ext in order
      to support SMP.

3.5) struct sas_hba_tran_ext

      sas_hba_tran_ext structure is a kernel structure providing the
      semantics of tran_extension of scsi_hba_tran(7S). sas_hba_tran_ext
      defines vectors that an SAS HBA driver exports to SCSA interfaces
      for SMP transport so that SAS HBA specific function can be executed.
      In fact, sas_hba_tran_ext is a extension of scsi_hba_tran(9S). The
      associated struct sas_hba_tran_ext includes the following two members:

          int (*tran_sas_getcap)(
              struct sas_addr         *ap,
              char                    *cap);

          int (*tran_smp_start)(
              struct smp_pkt          *pkt);

      tran_sas_getcap                  Function entry that retrieves a SAS
                                       capability. The entry point is similar
                                       to tran_getcap() function of
                                       scsi_hba_tran(9S)

      tran_smp_start                   Function entry that starts a SMP
                                       request execution on the SAS HBA
                                       hardware. The entry point is similar
                                       to the tran_start() function of
                                       scsi_hba_tran(9S).

3.6) SAS HBA driver extension

      To support SMP functions, each SAS HBA driver must provide functions
      in addition to those required for traditional SCSI device I/O. Phase
      1 of this project enhances the mpt(7D) driver to support SMP functions
      as detailed below:

3.6.1) implementation for sas_hba_tran_ext vector

        The tran_sas_getcap() and tran_smp_start() interfaces have to
        be implemented by SAS HBA driver. In this proposal, mpt(7D)
        will be enhanced to implement the tran_sas_getcap() and
        tran_smp_start() functions.

3.6.2) SMP targets automatic enumeration

        When a SAS HBA target driver supports SMP functions, the driver
        will enumerate all attached SMP targets automatically. Phase 1
        of this project enhances mpt(7D) to automatically detect and
        enumerate SMP target devices in Solaris.

3.6.3) SMP targets dynamic reconfiguration

        The changes to mpt(7D) for Phase 1 (and other SAS HBAs for later
        phases) require the driver to be aware of status changes between
        the host and the attached SMP target device. When there is a change
        the HBA driver will online or offline the SMP target instances
        automatically without the needs of reboot or manually invoke
        devfsadm(1M).

3.7) We also define two new common functions for converting the string
      representation of a devid to a 64bit SAS address:

      int      devid_str_to_wwn(const char *string, uint64_t *wwn)
      int      ddi_devid_str_to_wwn(const char *string, uint64_t *wwn);


4) Interface Summary and Commitment Levels
------------------------------------------

|-----------------------------------------------------------------------------|
| Interface Name          | Commitment   |           Comments                 |
+-------------------------+--------------+------------------------------------+
|                         |              |                                    |
|  smp(7D)                |  Cons. Priv. | Driver name for SMP target         |
|                         |              | devices.(Typically, SAS expander   |
|                         |              | devices)                           |
|                         |              |                                    |
|  usmp(7I                |  Cons. Priv. | Driver exports this interface      |
|                         |              | allowing user passthrough SMP      |
|                         |              | function request to SMP target     |
|                         |              | Devices from user-level.           |
|                         |              |                                    |
|  /usr/lib/devfsadm/     |              |                                    |
|  linkmod/SUNW_smp_link  |  Cons. Priv. | devfsadm link generation module    |
|                         |              |                                    |
|  /dev/smp/expd?         |  Cons. Priv. | Repository for link to SMP devices |
|                         |              |                                    |
|  ddi_sas_smp            |  Cons. Priv. | minor nodetype for device minor    |
|                         |              | nodes created by smp(7D)           |
|                         |              |                                    |
|  ddi_devid_str_to_wwn() |  Cons. Priv. | DDI function for convert a string  |
|                         |              | to 64 bits SAS address             |
|                         |              |                                    |
|  devid_str_to_wwn()     |  Cons. Priv. | function of libdevid library       |
|                         |              |                                    |
|  sas_*()                |  Proj. Priv  | kernel functions for smp transport |
|                         |              | service in SCSA                    |
|                         |              |                                    |
|  tran_extension         |  Cons. Priv. | scsi_hba_tran_t struct member for  |
|                         |              | extending scsi_hba_tran(9S)        |
|                         |              |                                    |
|  sas_hba_tran_ext       |  Proj. Priv. | SAS HBA driver transport extension |
|                         |              | vector struct. sas_hba_tran_ext    |
|                         |              | instantiate tran_extension of      |
|                         |              | scsi_hba_tran_t.                   |
|                         |              |                                    |
+-----------------------------------------------------------------------------+


5) References
-------------

PSARC 2001/401 MPT driver (message passing technology)
PSARC 2006/703 MPxIO extension for Serial Attached SCSI (SAS) on mpt(7D)
PSARC/2004/504 Common Devid/GUID Encode Interfaces for SCSI Devices
PSARC/1999/525 GENERIC SCSI PASS THROUGH FOR SOLARIS
PSARC/1993/259 SCSI HBA interface
LSI Fusion-MPT Message Passing Interface Specification v1.5.2
Serial Attached SCSI (SAS)
(http://www.t10.org/ftp/t10/drafts/sas/sas-r05.pdf)
Serial Attached SCSI - 1.1 (SAS-1.1)
(http://www.t10.org/ftp/t10/drafts/sas1/sas1r10.pdf)
Serial Attached SCSI - 2 (SAS-2)
(http://www.t10.org/ftp/t10/drafts/sas2/sas2r11.pdf



From Cecilia.Hu@sun.com Wed Oct 17 16:29:50 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9HNTolB028733
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 17 Oct 2007 16:29:50 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l9HNQQK3017683;
	Wed, 17 Oct 2007 16:26:26 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JQ200I05X420U00@brm-avmta-1.central.sun.com>; Wed,
 17 Oct 2007 17:26:26 -0600 (MDT)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JQ2004WYX40V4E0@brm-avmta-1.central.sun.com>; Wed,
 17 Oct 2007 17:26:25 -0600 (MDT)
Received: from fe-apac-05.sun.com
 (fe-apac-05.sun.com [192.18.19.176] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l9HNQNpr024235; Wed,
 17 Oct 2007 23:26:23 +0000 (GMT)
Received: from sun.com ([129.158.123.20])
 by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr  3
 2006)) with ESMTP id <0JQ2009P6X3ZO2H4@mail-apac.sun.com>; Thu,
 18 Oct 2007 07:26:23 +0800 (SGT)
Received: from [192.18.19.172] (Forwarded-For: [129.158.71.31])
 by sedge2-mail1.singapore.sun.com (mshttpd); Thu, 18 Oct 2007 07:26:23 +0800
Date: Thu, 18 Oct 2007 07:26:23 +0800
From: En-Hua Cecilia Hu <Cecilia.Hu@sun.com>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <47142759.1060106@sun.com>
To: Cecilia.Hu@sun.com
Cc: PSARC-ext@sun.com, Javen Wu <javen.wu@sun.com>,
        yongfeng du <Yongfeng.Du@sun.com>, Ming Li <River.Li@sun.com>,
        James.McPherson@sun.com, Greg.Price@sun.com,
        Eric Schrock <Eric.Schrock@sun.com>, Michael.Shapiro@sun.com,
        Keith M Wesolowski <Keith.Wesolowski@sun.com>
Message-id: <f89fcb1626a8.47170a9f@sun.com>
MIME-version: 1.0
X-Mailer: Sun Java(tm) System Messenger Express 6.2-6.01 (built Apr  3 2006)
Content-type: text/plain; charset=us-ascii
Content-language: en
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-Accept-Language: en
Priority: normal
X-PMX-Version: 5.2.0.264296
References: <47142759.1060106@sun.com>
Status: RO
Content-Length: 65

This case was approved during today's PSARC meeting.

--
Cecilia

From javen.wu@Sun.COM Wed Oct 17 16:33:07 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9HNX6Ip028834
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 17 Oct 2007 16:33:07 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l9HNThJa009473
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 18 Oct 2007 00:29:44 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JQ200905X9I0V00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 17 Oct 2007 16:29:42 -0700 (PDT)
Received: from dm-prc-01.singapore.sun.com ([129.158.71.109])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JQ200M6JX9H1270@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 17 Oct 2007 16:29:42 -0700 (PDT)
Received: from sandieji.prc.sun.com (sandieji.PRC.Sun.COM [129.158.219.50])
	by dm-prc-01.singapore.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id l9HNTc9S008302; Thu, 18 Oct 2007 07:29:38 +0800 (SGT)
Received: from [127.0.0.1] (vpn-129-150-144-15.PRC.Sun.COM [129.150.144.15])
	by sandieji.prc.sun.com (8.13.2+Sun/8.13.2) with ESMTP id l9HNHOiO017233; Thu,
 18 Oct 2007 07:17:25 +0800 (CST)
Date: Thu, 18 Oct 2007 07:28:53 +0800
From: "javen.wu" <javen.wu@Sun.COM>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <f89fcb1626a8.47170a9f@sun.com>
To: En-Hua Cecilia Hu <Cecilia.Hu@Sun.COM>
Cc: PSARC-ext@Sun.COM, yongfeng du <Yongfeng.Du@Sun.COM>,
        Ming Li <River.Li@Sun.COM>, James.McPherson@Sun.COM,
        Greg.Price@Sun.COM, Eric Schrock <Eric.Schrock@Sun.COM>,
        Michael.Shapiro@Sun.COM, Keith M Wesolowski <Keith.Wesolowski@Sun.COM>
Message-id: <47169AB5.9070706@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=UTF-8; format=flowed
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.2.0.264296
References: <47142759.1060106@sun.com> <f89fcb1626a8.47170a9f@sun.com>
User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)
Status: RO
Content-Length: 213

Thanks, Ceci,

I dialed in the meeting. :)

Okey, we can move ahead to testing and putback...

Thanks
Javen
En-Hua Cecilia Hu 写道:
> This case was approved during today's PSARC meeting.
>
> --
> Cecilia
>   



From Cecilia.Hu@Sun.COM Tue Dec  4 19:10:10 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id lB53AAm2020647
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 4 Dec 2007 19:10:10 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id lB53A81j007028;
	Tue, 4 Dec 2007 19:10:08 -0800 (PST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JSK00B253GUOY00@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 04 Dec 2007 19:10:06 -0800 (PST)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JSK009U23GSWKB0@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 04 Dec 2007 19:10:05 -0800 (PST)
Received: from fe-apac-06.sun.com
 (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id lB53A31J020154; Wed,
 05 Dec 2007 03:10:03 +0000 (GMT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JSK00F013F7DX00@mail-apac.sun.com>
 (original mail from Cecilia.Hu@Sun.COM); Wed, 05 Dec 2007 11:10:03 +0800 (SGT)
Received: from [129.158.218.120] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JSK00HCK3GPYJ4O@mail-apac.sun.com>; Wed,
 05 Dec 2007 11:10:03 +0800 (SGT)
Date: Wed, 05 Dec 2007 11:10:02 +0800
From: Cecilia Hu <Cecilia.Hu@Sun.COM>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <f89fcb1626a8.47170a9f@sun.com>
Sender: Cecilia.Hu@Sun.COM
To: PSARC-ext@Sun.COM
Cc: Javen Wu <javen.wu@Sun.COM>, yongfeng du <Yongfeng.Du@Sun.COM>,
        Ming Li <River.Li@Sun.COM>, James.McPherson@Sun.COM,
        Greg.Price@Sun.COM, Eric Schrock <Eric.Schrock@Sun.COM>,
        Michael.Shapiro@Sun.COM, Keith M Wesolowski <Keith.Wesolowski@Sun.COM>
Reply-to: Cecilia.Hu@Sun.COM
Message-id: <4756168A.6070001@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <47142759.1060106@sun.com> <f89fcb1626a8.47170a9f@sun.com>
User-Agent: Thunderbird 1.5.0.8 (X11/20061204)
Status: RO
Content-Length: 2277

According to implementation experience & hardware limitation prior to the
project integration, the proposal this case provided need minor private
interface modification.

Given the changes is clear enough for a self-review, the IAM file is kept
un-changed, and the modification is explained as below.  Any concern about
it, please let me know; If no comments, I will update the spec file.

-- Cecilia


---------------------------------------------------------------------------
REASON:
-------
Because of hardware limitation, LSI SAS HBA doesn't support send SMP
request to expanders through specific HBA port. SAS address of SMP target
is enough to address expander. So the port identifier is removed from name
of SMP target identifier. And a_pport is removed from private structure
smp_address.

MODIFIED SPEC:
--------------
3.2) /dev and /device naming

      smp(7D) creates device nodes in /devices with node names of the format
|    "smp@wSASADDR" and minor name of "smp". The SASADDR is a 16 character
|    (64bit hex) SAS World Wide Address. An expander might appear as:

|    /devices/pci@0,0/pci10de,5d@d/pci1000,3150@0/smp@w5001636000005aff:smp

|    According to the SAS specification, SASADDR uniquely identifies an SMP
|    device.

      This project delivers a devfsadm(1M) link module which creates appropriate
      links in /dev that point to the device node under /devices. The link
      module creates an entry under /dev/smp/expd? for each SMP target
      device node which is detected by Solaris.

      To continue the above example, devfsadm will create the link

      /dev/smp/expd0 -> ../../devices/pci@0,0/pci10de,5d@d/pci1000,3150@0 \
|    /smp@w5001636000005aff:smp

3.3) SCSA extension for SMP transport

<remove>
      uint32_t               a_pport;         /* physical port */

3.3.1)
        device only.

        int sas_smp_probe(struct smp_device *smp_devp);

        sas_smp_probe() is a kernel function for probing the existence
        of a specific SMP target device described in the smp_device
        structure. sas_smp_probe() sends the SMP function REPORT GENERAL
|      to a specific sas address to detect the presence of a SMP target
|      device.

MODIFIED MANPAGE:
-----------------
SYNOPSIS

|     smp@w<sas_addr>:smp



From Cecilia.Hu@sun.com Thu Apr 24 22:27:17 2008
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m3P5RHCD013314
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 24 Apr 2008 22:27:17 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m3P5RHFl010778;
	Thu, 24 Apr 2008 22:27:17 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JZV00F018HG2800@nwk-avmta-2.sfbay.sun.com>; Thu,
 24 Apr 2008 22:27:16 -0700 (PDT)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JZV00D3E8HF6450@nwk-avmta-2.sfbay.sun.com>; Thu,
 24 Apr 2008 22:27:16 -0700 (PDT)
Received: from fe-apac-06.sun.com
 (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m3P5RT6M002731; Fri,
 25 Apr 2008 05:27:29 +0000 (GMT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JZV00G0189RFI00@mail-apac.sun.com>
 (original mail from Cecilia.Hu@Sun.COM); Fri, 25 Apr 2008 13:26:25 +0800 (SGT)
Received: from [129.158.218.120] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JZV00BFQ8FZRFVG@mail-apac.sun.com>; Fri,
 25 Apr 2008 13:26:25 +0800 (SGT)
Date: Fri, 25 Apr 2008 13:25:46 +0800
From: Cecilia <Cecilia.Hu@sun.com>
Subject: Re: PSARC 2007/595 Serial Attached SCSI (SAS) Management Protocol
 (SMP) support for Solaris
In-reply-to: <4756168A.6070001@sun.com>
Sender: Cecilia.Hu@sun.com
To: Cecilia.Hu@sun.com
Cc: PSARC-ext@sun.com, Javen Wu <Javen.Wu@sun.com>,
        yongfeng du <Yongfeng.Du@sun.com>, Ming Li <River.Li@sun.com>,
        James.McPherson@sun.com, Greg.Price@sun.com,
        Eric Schrock <Eric.Schrock@sun.com>, Michael.Shapiro@sun.com,
        Keith M Wesolowski <Keith.Wesolowski@sun.com>, Tzongyu.Lee@sun.com
Message-id: <48116B5A.4070008@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <47142759.1060106@sun.com> <f89fcb1626a8.47170a9f@sun.com>
 <4756168A.6070001@sun.com>
User-Agent: Thunderbird 2.0.0.12 (X11/20080325)
Status: RO
Content-Length: 327

According to the requirement from System Group, this project needs to be
backport into s10u6.

Therefore, this case's release binding will be shifted to "Micro/Patch",
and this mail is sent to record.  I think it's qualified for self-review,
so the case status is kept unchanged.  Any concern, please let us know.

-- 
Cecilia

