I am sponsoring this following fasttrack for myself, requesting patch
binding and a timeout of 7/13/2007.
-Chris
Template Version: @(#)sac_nextcase 1.61 05/24/07 SMI
This information is Copyright 2007 Sun Microsystems
#pragma ident "%Z%%M% %I% %E% SMI"
1. Introduction
1.1. Project/Component Working Name:
SCSI inquiry property enhancement
1.2. Name of Document Author/Supplier:
Author: Chris Horne
1.3 Date of This Document:
04 June, 2007
4. Technical Description
4.1 Problem
Inquiry-vendor-id(9P) properties were introduced by "SCSI
INQUIRY data properties" <http://sac.sfbay/PSARC/2000/332>.
T10 standards describe translations between SCSI and other
native transport/protocols, like SATA
<http://t10.org/drafts.htm#sat->.
During T10 translation, if the native transport representation
of inquiry-like data does not fit the scsi_inquiry(9S) model,
loss of information by substitution and/or truncation occurs.
Accurate inquiry-*(9P) property values are important to FMA.
The values are used to identify a failed drive FRU, and should
match the information printed on the drive - including serial
number.
Obtaining accurate values in transport specific ways leads to
the proliferation of transport specific interfaces - causing
the spread of transport specific knowledge across all
consumers.
4.2 Proposal
Instead of using transport specific mechanisms to obtain
accurate inquiry-*(9P) values, the proposal is to treat the
inquiry-*(9P) values 'figuratively'.
Treating inquiry-*(9P) figuratively permits a T10 native
transport translation layer (like SATA) to establish accurate
values from native information at tran_tgt_init(9E) time. The
native values take precedence over SCSI protocol based values
established by SCSA during scsi_probe(9F).
Treating inquiry-*(9P) figuratively also allows us to introduce
new inquiry-like properties based on data other than
scsi_inquiry(9S). This proposal introduces a new
inquiry-serial-no(9P) property based on EVPD "Unit Serial
Number" (page 0x80 SCSI INQUIRY data (or is established by the
native transport at tran_tgt_init(9E) time).
With this approach, SCSA (or new target driver code) that
establishes a SCSI-protocol based inquiry-*(9P) value must
first check to see if the native transport has already
established a value - the native value takes precedence.
NOTE: The scsi(4) compatible property defined by PSARC/2004/116
will still be derived using scsi_inquiry(9S) data.
4.2.1 Field Size Limitations of Existing inquiry-(9P) Properties
An example of field size mismatch, with SATA the native
'Identify Device Data' field that maps to INQUIRY_REVISION_ID
is eight bytes long, but the scsi_inquiry(9S) 'inq_revision'
field is only four bytes long.
The current definition of "inquiry-*"(9P) properties is
explicit about where property values come from:
"... it contains the SCSI vendor identification
inquiry data (from SCSI inquiry data bytes 8 - 15)..."
This proposal takes the position that:
o The current man page is defining the 'typical' source of the
information for property value.
Obtaining this information from other, more accurate, sources
is a compatible change.
o The current man page definition does not define the length of
the property value string.
The current code already trims trailing blanks and adds a
null termination, so the property string length already lacks
a hard relationship with the 'typical' source.
For string properties, both the user and kernel interfaces to
obtain values define interfaces where the implementation
performs the value memory allocation:
o user applications obtain string values via
di_prop_lookup_strings(3DEVINFO). They get back a pointer
to the snapshot memory containing the value. The consumer
is not doing the allocation.
o kernel consumers use ddi_prop_lookup_string(9F), and get
back a pointer to the allocated string, and must call
ddi_prop_free(9F) when done. Again, the consumer is not
doing the allocation.
Given this, having longer property values should not be a
problem, making this aspect of the proposal a compatible
change.
NOTE: The only known consumer of inquiry-*(9P) properties is
the cfgadm scsi plugin code, for which it was first
introduced.
4.2.2 New inquiry-*(9P) properties: Serial Number
A new inquiry-like property called 'inquiry-serial-no' is
proposed. This property will be established by the target
driver in the SCSI-protocol defined way: issuing a an EVPD
"Unit Serial Number" (page 0x80) SCSI INQUIRY command. The
page 0x80 data returned is not in scsi_inquiry(9S) form.
If a device does not support page 0x80, then the
inquiry-serial-no(9P) property is not defined.
4.3 Example
Example: SATA disk 'inquiry-*(9P)' properties
Before:
name='inquiry-vendor-id' type=string items=1
value='ATA'
name='inquiry-product-id' type=string items=1
value='HITACHI HDS7250S'
name='inquiry-revision-id' type=string items=1
value='AJ0A'
After:
name='inquiry-vendor-id' type=string items=1
value='HITACHI'
name='inquiry-product-id' type=string items=1
value='HDS7250SASUN500G 0647KLA1NF'
name='inquiry-revision-id' type=string items=1
value='K2AOAJ0A'
name='inquiry-serial-no' type=string items=1
value='KRVP65ZAKLA1NF'
4.4 Interface Table
------------------------------------------------------------------------
Interface Level Comments
------------------------------------------------------------------------
Modified:
inquiry-vendor-id(9P) Committed value is only
inquiry-product-id(9P) loosely-coupled to
inquiry-revision-id(9P) scsi_inquiry(9S) data.
New:
inquiry-serial-no(9P) Committed serial number property
4.5 References
o T10 SAT SCSI/ATA Translation
http://t10.org/drafts.htm#sat-
o SCSI INQUIRY data properties
http://sac.sfbay/PSARC/2000/332
o New SCSI Properties
http://sac.sfbay/PSARC/2001/319
o SCSI target compatible property
http://sac.sfbay/PSARC/2004/116
4.6 Changes to inquiry-vendor-id(9P) man page:
See below.
6. Resources and Schedule
6.4. Steering Committee requested information
6.4.1. Consolidation C-team Name:
ON
6.5. ARC review type:
FastTrack
A.1 inquiry-prop(9P) man page changes
:r!diff -U 5 inquiry-prop.man.orig inquiry-prop.man.new
{
--- inquiry-prop.man.orig Tue May 15 09:37:49 2007
+++ inquiry-prop.man.new Tue May 15 10:06:09 2007
@@ -1,34 +1,48 @@
Kernel Properties for Drivers inquiry-device-type(9P)
NAME
inquiry-device-type, inquiry-vendor-id, inquiry-product-id,
- inquiry-revision-id - properties from SCSI inquiry data
+ inquiry-revision-id, inquiry-serial-no
+ inquiry properties for SCSI devices.
DESCRIPTION
- These are optional properties created by the system for SCSI
- target devices.
+ These are optional properties, typically created by the system,
+ for SCSI target devices. References to these properties should
+ use their <sys/scsi/impl/inquiry.h> defined names.
- inquiry-device-type is an integer property. When present,
- the least significant byte of the value indicates the device
- type as defined by the SCSI standard.
+ inquiry-device-type is an integer property. When present, the
+ least significant byte of the value indicates the device type as
+ defined by the SCSI standard. Consumers of this property should
+ compare the property values with DTYPE_* values defined in
+ <sys/scsi/generic/inquiry.h>.
- inquiry-vendor-id is a string property. When present, it
- contains the SCSI vendor identification inquiry data (from
- SCSI inquiry data bytes 8 - 15), formatted as a NULL-
- terminated string.
+ inquiry-vendor-id is a string property. When present, it contains
+ the vendor information. This information typically comes from the
+ scsi_inquiry(9S) 'inq_vid' field.
- inquiry-product-id is a string property. When present, it
- contains the SCSI product identification inquiry data (from
- SCSI inquiry data bytes 16 - 31).
+ inquiry-product-id is a string property. When present, it contains
+ the product identification. This information typically comes from
+ the scsi_inquiry(9S) 'inq_pid' field.
- inquiry-revision-id is a string property. When present, it
- contains the SCSI product revision inquiry data (from SCSI
- inquiry data bytes 32 - 35).
+ inquiry-revision-id is a string property. When present, it
+ contains the product revision. This revision typically comes from
+ the scsi_inquiry(9S) 'inq_rev' field.
- Consumers of these properties should compare the property
- values with DTYPE_* values defined in
- <sys/scsi/generic/inquiry.h>.
+ inquiry-serial-no is a string property. When present, it contains
+ the serial number. The serial number is typically obtained from
+ the EVPD "Unit Serial Number" SCSI INQUIRY data (page 0x80).
+NOTE
+ Values established at tran_tgt_init(9E) time by an HBA driver take
+ precedence over values established by the system, and HBA driver
+ values may not be the same length as the typical scsi_inquiry(9S)
+ field.
+
SEE ALSO
- Writing Device Drivers
+ scsi_inquiry(9S), Writing Device Drivers
}