1. Question
    1. 4.4.2.1
      1. p.78 What if HARD RESET after IDENTIFY
  2. Architecture
  3. Names and Identifiers
    1. Overview
      1. Device name
        1. Worldwide unique names for devices within a transport protocol.
      2. Prot name
        1. Worldwide unique names for ports within a transport protocol
      3. Port identifier
        1. The value by which ports are identified within a domain
      4. Phy identifier
        1. The value by which phys are identified within a device
    2. SAS address
      1. Should use the NAA IEEE Registered format
      2. 00000000_00000000h indicates an invalid identifier
    3. Hashed SAS address
      1. BCH(63,39,9) code
    4. Device name
      1. SAS
        1. Should include a SAS address as its device name
          1. Should not be used as any other name or identifier
          2. Except: the SAS address of an expander device = the one of the SMP port in that expander device
        2. Report their device name by IDENTIFY address frame
      2. SATA
    5. Port name
      1. Not defined in SAS
    6. Port identifier
      1. Should include a SAS address as its port identifier
        1. Shall not be used as any other name or identifier
        2. Except
          1. Used as a port identifier in one or more other SAS domains
          2. The SAS address of an SMP port in an expander device = the one of the expander device containing that SMP port
      2. Expander ports do not have port idenitifiers
      3. Report its own port identifier
        1. SAS ports in end devices
          1. IDENTIFY address frame
        2. Expander devices containing SAS ports
          1. SMP DISCOVER response
      4. As source and destination SAS addresses in the OPEN address frame
    7. Phy identifier
      1. Unique within the SAS device and/or expander device
      2. Each SAS/(expander) logical phy within a SAS(expander) phy shall use the same phy identifier
      3. Used for managemetn functions
      4. Range: 00h~FEh
      5. Start from 00h
      6. A device with SMP target port
        1. < the NUMBER OF PHYS field in SMP REPORT GENERAL response
      7. A device with SSP target port
        1. < the NUMBER OF PHYS field in the Phy Control And Discover mode page
  4. State Machine
  5. Reset
  6. I_T Nexus Loss
    1. Occur when
      1. I_T nexus loss timer expires
      2. SAS port receives an abandon-class OPEN_REJECT
    2. Handled by port layer state machine
      1. SSP port
        1. Send a Nexus Loss event notification to SCSI app. layer
      2. SSP initiator port
        1. a SCSI application client send an I_T NEXUS RESET to SSP target port during the next connection
      3. STP initiator
        1. Send a Transport Event Notification to ATA app. client
      4. STP target port
        1. Abort all outstanding commands for the lost STP initiator port
      5. SMP initiator port
        1. Stop attempting to establish connections to the lost SMP target
  7. Expander device model
    1. Containing
      1. An expander function
        1. An expander connection manager (ECM)
          1. Mapping
          2. Direct
          3. Subtractive
          4. Table routing
          5. Arbitration
          6. Configure the ECR
        2. An expander connection router (ECR)
          1. Route messages between pairs of expander logical phys as configured by ECM
          2. Rate matching
          3. May discard dwords
        3. A Broadcast propagation processor (BPP)
          1. Receive Broadcasts from
          2. each expander logical phy
          3. the management device sever
          4. On behave of an expander logical phy
          5. Requests transmission of those Broadcasts on all expander ports except the expander port from which the Broadcast was received
      2. Two or more physical expander phys
      3. An expander port available per phy
      4. An SMP target port and a management device server
      5. Optional
        1. An SMP initiator port and a management application client
        2. SAS devices with SSP ports, STP ports, and/or SMP ports and their associated device servers and/or application clients
    2. Expander Port
      1. Each phy in the expander device has the same
        1. SAS address
        2. routing attribute
        3. zone phy information
      2. A set of expander phys with
        1. table routing attributes in an expander device
          1. Supporting table-to-table attachments using the same external connector ?
          2. O: Enclosure universal port
          3. X: Enclosure out port
        2. subtractive routing attribute using the same external connector
          1. Enclosure in port
      3. Each expander logical phy contains an expander link layer with
        1. an XL state machine
          1. process connection requests independently of those in other expander logical phys
        2. one set of SL_IR state machines
      4. An internal expander port contains a virtual phy with
        1. an expander link layer
        2. a protocol-specific transport layer
      5. Each expander device shall include one internal SMP port using the expander device's SAS address
      6. Each STP/SATA bridge shall have a unique SAS address
      7. Any additional internal SAS ports
        1. Shall be inside SAS devices contained in the expander device
        2. Have SAS addresses different from that of the expander device
    3. Expander Device Interfaces
      1. Arbitrate and route between expander logical phys
      2. All routing occurs between expander logical phys
        1. Not expander ports
      3. Definition
        1. Interactions between an XL state machine and the expander function
          1. Request
          2. Confirmation
          3. Indication
          4. Response
    4. Expander Device Routing
      1. ECM determine routing method by the routing attributes(RAs)
      2. Attached to an End Device ?
        1. O
          1. Direct
        2. X
          1. RA: Direct
          2. Direct
          3. RA: Table
          4. Direct for SAS address of the expander device
          5. Table for SAS addresses beyond the expander device
          6. RA: Subtractive
          7. Subtractive
      3. Restrictions
        1. If an expander device not support table-to-table attachment
          1. Its routing phys shall not be attached to table routing phys in other expander devices
        2. If multiple phys within an expander device have subtractive routing attribute and are attached to expander devices
          1. shall be attached to phys with identical SAS address
      4. Connection request routing
        1. Determination
          1. The destination expander logical phy is enabled?
          2. Operating at a valid logical link rate?
          3. Not exclued because of zoning?
        2. Precedence
          1. (1) When the destination SAS address matches the attached SAS address
          2. Direct routing attrivute
          3. Table routing attribute
          4. (2) When the destination SAS address matches an enabled SAS address in the expander route table
          5. Table routing attribute
          6. (3) Subtractive routing attribute ; and
          7. (4) Return Arb Reject confirmation to source expander logical phy
        3. If only matches an expander logical phy in the same expander port
          1. ECM return Arb Reject confirmation
        4. If match a disabled SAS address in an expander table
          1. ECM ignore the mathc
      5. Expander routing table
        1. Provide an association between
          1. Destination SAS address
          2. i.e., routed SAS address
          3. The expander phys to which connection requests to those destination SAS address are forward
        2. Type
          1. Phy-based (M×N)
          2. Expander route index
          3. M ≦(EXPANDER ROUTE INDEXES field value in the REPORT GENERAL resonse) -1
          4. Phy identifier
          5. N ≦ (# of PHYS field value in the REPORT GENERAL response) -1
          6. Expander route entry
          7. ROUTED SAS ADDRESS field
          8. DISABLE EXPANDER ROUTE ENTRY bit
          9. Access
          10. SMP REPORT ROUTE INFORMATION
          11. SMP CONFIGURE ROUTE INFORMATION
          12. Expander-based
          13. Access
          14. REPORT EXPANDER ROUTE TABLE LIST
          15. Phy bit map
          16. Indicate the expander phy(s) to which connection requests to the routed SAS address may be forwareded
          17. 1
          18. The expander phy is used for forwarding connection requests
          19. 0
          20. Not used for forwarding connection requests
    5. Reduced functionality
      1. REDUCED FUNCTIONALITY bit in the REPORT GENERAL response
      2. The reduced functionality delay timer
  8. Discover Process
    1. Overview
      1. Performer
        1. Management application client
      2. Determination
        1. Device types
        2. SAS addresses
        3. Supported protocols
      3. Usage
        1. SAS initiator
          1. Establish connection and select connection rate
        2. Self-configuring expander
          1. Ffill in its expander route table
    2. When to start?
      1. SAS initiator
        1. After a link reset sequence
          1. Discover all the devices in the SAS domain
        2. After receiving a Broadcast(Change)
          1. Determine which device have been added to or removed from the SAS domain
      2. Self-configuring expander
        1. After link reset sequence
          1. Discover all the devices in the SAS domain
        2. After receiving a Broadcast(Change
          1. Determine which device have been added to or removed from the SAS domain
    3. Discover process traversal
      1. Breadth-first
      2. Completion
        1. All expanders have been traversed
      3. Not required to perform the configuration subprocess
        1. End device
        2. Self-configuring expander
          1. Direct attached to a self-configuring expander device B
          2. CONFIGURES OTHERS bit set to one in the REPORT GENERAL response
      4. Determine device type
        1. Expander device
          1. DEVICE TYPE field in the IDENTIFY address frame
        2. SAS device
          1. ATTACHED DEVICE TYPE TYPE field in the SMP DISCOVER response
      5. If Expander attached
        1. Determine how many phys
          1. SMP REPORT GENERAL FUNCTION
        2. Determine what is attached to each expander phy
          1. SMP DISCOVER LIST
      6. IF SAS device attached
        1. Determine additional information
          1. SMP target port
          2. Use SMP function
          3. SSP target port
          4. Transmit SCSI commands
          5. STP target port
          6. Transmit ATA connmads
      7. Result
        1. The management application client has the necessary information to communicate with
          1. Each SAS device
          2. Expander deivce in the SAS domain
          3. Each externally configurable expander device
          4. Configured with the necessary expander route entries to allow routing of connection requests through the SAS domain
      8. Abortion
        1. If using incorrect information
    4. Discover process in a self-configuring expander device
      1. Descriptor?
    5. Enabling multiplexing
      1. If SAS domain contains
        1. All 6 Gbps SAS phys
          1. Disable multiplexing on every phys
        2. All 3 Gbps SAS phys
          1. Multiplex each 6 Gbps physical link into two 3 Gbps logical links
          2. Not multiplex 3 Gbps physical links
        3. All 1.5 Gbps SAS phys
          1. Multiplex each 3 Gbps physical link into two 3 Gbps logical links
          2. Multiplex each 3 Gbps physical link into two 1.5 Gbps logical links
  9. Configuration subprocess
    1. A single discover process performs the configuration subprocess at least once per externally configurable expander
    2. Optimization
      1. The method used to enable and disable the route table optimization is vendor specific
      2. If enabled
        1. Exclude discovered SAS addresses from the expander route table
          1. FUNCTION RESULT field is set to a non-zero value (Not SMP FUNCTION ACCEPTED)
          2. FUNCTION RESULT field is set to zero (SMP FUNCTION ACCEPTED)
          3. ROUTING ATRIBUTE field is dset to 1h or 2h (Subtracrive or table)
          4. ATTACHED DEVICE TYPE field is set to zero (No device attached)
          5. ATTACHED DEVICE TYPE is set to a non-zero value (End device or expander device)
          6. ATTACHED SAS ADDRESS field contains the SAS address of the expander device being configured (A self-referencing address)
          7. ATTACHED SAS ADDRESS field contains the SAS address of of a device directly attached to the expander device being configured
          8. ATTACHED SAS ADDRESS field contains the SAS address of that already exists in the expander route table
        2. If inconsistency is detected
          1. Report an error
          2. Disable route table optimization
          3. The management application client should re-initiate a discover process with route table optimization disabled
      3. If disabled
        1. All SAS addresses shall be qualified for insertion in the expander route table
      4. If supports
        1. Check the following situations
          1. An I_T nexus loss occurs for a destination port that is expected to be present
          2. A discover process has been completed
          3. Another SMP initiator port is discovered in the SAS domain
          4. A self-configuring expander device is discovered in the SAS domain
    3. Index order
      1. Each expander phy with a table routing attribute shall be configured.
      2. Expander phy attached to an exapnder device ?
        1. X
          1. Every expander route entry for taht expander phy shall be disabled
        2. O
          1. The expander route table shall be configured
          2. Assigned levels
          3. The expander device in which the expander route table is level 0
          4. The attached expander device is levle 1
          5. Device attached to level n-1 expander devices, except for level n-2 expander devices, are considered level n
  10. Zoning
    1. The zoning expander devices control whether a phy is permitted to participate in a connection to another phy
    2. All phys in a wide port shall be assigned to the same zone group
      1. All phys in an expander port shall have the same zone phy information
    3. INSIDE ZPSDS bit
      1. Zero or One
      2. REQUESTED INSIDE ZPSDS
        1. Used to establish the boundary of the ZPSDS
      3. INSIDE ZPSDS PERSISTENT
        1. Used to determine the value of the INSIDE ZPSDS bit after a link reset sequence
    4. Zone Permission Table
      1. Zero
        1. Rejected
      2. One
        1. Permitted
    5. Confiugration
      1. Overview
        1. Only accept
          1. SMP zone configuration function requests
          2. SMP ZONE ACTIVATE requests
          3. SMP ZONE UNLOCK requests while it is locked
        2. Only accept those from
          1. The zone manager that locked the zoning expander device
          2. i.e., the active zone manager
        3. Change zoning expander shadow values
      2. Lock
        1. Ensure that the same zone manager locks each zoning expander device
        2. Cpmplete condition
          1. A zone manager receives a successful SMP ZONE LOCK response from all required zoning expader devices
      3. Load
        1. Store SMP zone configuration information as zoning expander shadow values
        2. Zoning expander device only processes SMP zone configuration function requests from active zone manager while it is locked
        3. Zoning expander device
        4. SMP zone configuration function
          1. Contains
          2. SMP CONFIGURE ZONE PHY INFORMATION
          3. SMP CONFIGURE ZONE PERMISSION TABLE
          4. SMP ENABLE DISABLE ZONING
          5. Change the zoning shadow value
          6. Not affect the coning expander current values
        5. Skipped when a lock zoning expander device is unlocked
          1. By a zone manager with a higher SAS address during the lock step
          2. Because the zone lock inactivity timer expires
      4. Activate
        1. Copy the zoning expander shadow register values to the zoning expander current values
        2. Save the zoning expander shadow values, if saving was requested
        3. Active zone manager originates (one of two)
          1. Broadcast (Zone Activate)
          2. SMP ZONE ACTIVATE request to all locked zoning expander devices
        4. Skipped when a locked zoning expander device is unlocked
          1. By a zone manager with a higher SAS address during the lock step
          2. Because the zone lock inactivvity timer expires
      5. Unlock
        1. Ensure
          1. The active one manager unlocks the locked zoning expander devices
          2. If the zone manager fails
          3. Zone lock inactivity time expires
          4. Zoning expander devices unlock
      6. Zone lock inactivity timer
        1. Ensure that if the zone manager disappears without performing the unlock step
          1. All locked zoning expander devices are unlocked
        2. Default value
          1. ZONE LOCK INACTIVITY TIME LIMTI field
        3. If expires while the zoning expander device is processing an SMP configuration function
          1. Complete the request successfully or
          2. Return a function result of ZONE LOCK VIOLATION
  11. Phy Test Functions
    1. Each phy test function is optional
    2. For phy and interconnect characterization and diagnosis
    3. The phy test function on one phy may affect the previously negotiated settings on other phys
    4. While a phy is performing a phy test function
      1. The link receivers
        1. Ignore all incoming dwords
      2. the OOB signal detector
        1. detect COMINIT
      3. The phy
        1. Ignore any other OOB signals
    5. If a specific phy test pattern and/or phy test function physical link rate required
      1. The mechanism for invoking the phy test function specifies
        1. The phy test pattern
        2. Phy test function physical link rate
    6. After a phy stops performing a phy test function
      1. Link reset sequence
    7. While a phy is performing the transmit pattern phy test function
      1. The test equipment attached to that phy shall not transmit
        1. COMSAS or COMWAKE
        2. COMINIT except to stop the phy test function
    8. While performing the transmit pattern phy teset function
      1. A phy shall
        1. Ignore all dwords received
        2. Repeatedly transmit the specified pattern at the specified physical link rate
  12. Phy Events
    1. Saturating counter (32-bit) counts
      1. Invalid dwords received
      2. Dwords received with running disparity errors
      3. Loss of dword synchronization
      4. Phy reset problems
    2. The management device server
      1. Shall maintain phy events for the last vendor-specific number of events
      2. Should maintain at least one phy event per phy
      3. Shall assign descriptors to the events sequentially starting at 0001h
      4. Shall return the descriptors in the
        1. SMP REPORT PHY EVENT LIST response
      5. Shall return the index of the descriptor for the last event in
        1. SMP REPORT GENERAL response
        2. SMP REPORT PHY EVENT LIST response
        3. SMP DISCOVER LIST response