I am currently working with a SAS 1.1 device and reviewing
the SAS-1.1 and SAS-2 specification. I have some questions / comments
regarding the protocol specific port log page for SAS. Before I get to
that, I need to provide some simple screenshots of an actual SAS 1.1 device to
help describe my question.
The first eight bytes of the “Protocol-Specific Port
log parameter for SAS” are similar between SAS-1.1 and SAS-2. The
SAS-1.1 decoding is below. SAS-2 marks the “DS” bit as
Obsolete, uses “Format and Linking” instead of “LBIN”
and “LP”, and defines offset 6 as the “Generation Code.”

An array of “SAS Phy Log Desriptor” entries
follows this 8 byte header. The number of entries in the array is given
to us in the “Number of Phys” entry seen above. OK, so far so
good.
In reviewing SAS-1.1, the SAS phy log descriptor is a fixed 48 byte structure as you see here:

Traversing through the array of SAS phy log descriptors is
rather simple as you know the number of Phys and you know that each descriptor
is 48 bytes in length.
The complexity comes with SAS-2. This specification
defines variable length SAS phy log descriptors. Offset 3 of the above
structure is now defined as the “SAS Phy Log Descriptor Length”.
The structure is larger than 48 bytes and contains a variable number of Phy
Event Descriptors.
In my task, I do not have the luxury of enumerating various
information from the device so I do not know if it’s a SAS-1.1 or SAS-2
device. All I have is the log sense data to analyze. I need to know
if I’m looking at a SAS-1.1 descriptor or a SAS-2 descriptor. The first
method, or perhaps I should call it a hack, that comes to mind is:
If ( DescriptorOffset[3]==0 )
// It’s a fixed 48 byte descriptor (i.e.
SAS-1.1)
else
// it’s a variable length descriptor,
total len = DescriptorOffset[3]+4
Now finally to my question. If all I have access to is
this log page, would the above pseudo code be the preferred method of knowing
which descriptor the device is returning? If not, is there another field
in the descriptor that would be preferred? Should a “Version”
field be introduced so that the application layer knows which version of the
structure they are looking at and which fields are valid?
Another question. If I could enumerate more
information from the device, what would be the preferred way to detect a
SAS-1.1 vs SAS-2 device from the application layer? Would the “Version
Descriptors” in the Inquiry page be the recommended method?
Thinking out loud, should SAS-2 introduce a new “cleaner”
sub-page instead of expanding the current page? I am not a big fan of
variable sized arrays nested within other variable sized arrays.
-------
Mike
Berhan
busTRACE
Technologies
9700
Village Center Drive
Suite
50-F
Granite
Bay, CA 95746
916.773.4554
phone
916.218.6283
fax