[[resend to PSARC-EXT at sun.com instead of PSARC at sac.sfbay.sun.com]]
I am sponsoring this following fasttrack for myself, requesting patch
binding and a timeout of 03/29/2007.
Subject: PSARC FastTrack [03/29/2007]: path-oriented driver alias
Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Sun Proprietary: Need-to-Know
1. Introduction
1.1. Project/Component Working Name:
path-oriented driver alias
1.2. Name of Document Author/Supplier:
Author: Chris Horne
1.3 Date of This Document:
22 March, 2007
4. Technical Description
4.1 Background
Driver aliases are defined by add_drv(1M) and update_drv(1M)
'-i' option use. Solaris uses the highest precedence IEEE-1275
'compatible' form with an 'alias' mapping to select a driver
for a device.
Solaris currently lacks a mechanism to allow separate device
instances with identical compatible properties to bind to
different drivers. A way to overcome this limitation is
needed. In addition to being useful during driver development,
generic hardware may support firmware download that, depending
on download, presents different functions and interfaces to a
Solaris driver.
Future storage appliance configurations will encounter this
firmware download situation with Fiber Channel connectivity.
In a storage appliance one instance of FC hardware may need to
bind to a SCSA HBA driver providing traditional SCSI initiator
role services, and it's twin may need to bind to a different
driver to implement SCSI target role services. The initiator
transports solicited data, the target transports unsolicited
data: this completely changes driver operation. Different
firmware for initiator .vs. target operation is downloaded by
the driver to generic hardware.
4.2 Proposal
To address this deficiency, the proposal is to implement a new
path-oriented alias form where the alias *is* the path below
/devices to the device. Kernel code will check for a
path-oriented alias driver binding. If such a binding exists,
it takes precedence over all IEEE-1275 'compatible' property
driver bindings.
A path-oriented alias is configuration specific, and should
only be used by driver developers to aid in development and
testing of new driver code, or indirectly by higher level
configuration utilities.
For the storage appliance example above, an administrative
configuration utility will likely be used to establish the
initiator .vs. target role, with its low level implementation
based on path-oriented aliases.
The update_drv(1M) man page will be modified to describe
path-oriented alias.
To avoid reboots, kernel code associated with update_drv will
be enhanced to allow rebinding to a new driver without reboot
(assuming the device is not in use).
4.3 Example
1: On a system with two "pci1077,2200" Qlogic FC cards with
paths "/pci at 8,600000/SUNW,qlc at 4" and
"/pci at 8,700000/SUNW,qlc at 2", to bind the first path to the
"qlt" driver instead of the "qlc" driver, the following
command could be used:
# update_drv -a -i '"/pci at 8,600000/SUNW,qlc at 4"' qlt
2: Sequence for testing a new version of ssd driver on root
device.
# cp /kernel/drv/ssd.conf /kernel/drv/xssd.conf
# cp <proto>/kernel/drv/sparcv9/ssd /kernel/drv/sparcv9/xssd
# mount | grep "/ "
/ on /dev/dsk/c1t1d0s0 ...
# ls -l /dev/dsk/c1t1d0s0
... -> /pci at 8,600000/SUNW,qlc at 4/fp at 0,0/ssd at
w2100000c50568a97,0:a
# add_drv -i '"/pci at 8,600000/SUNW,qlc at 4/fp at 0,0/ssd at
w2100000c50568a97,0" "/pci at 8,600000/SUNW,qlc at 4/fp at 0,0/disk at
w2100000c50568a97,0"' xssd
# reboot
<reboot>
# prtconf -vD | grep xssd
ssd, instance #0 (driver name: xssd)
value='id1,xssd at n2000000c50568a97'
NOTE: For root use, both "ssd" and "disk" paths are needed
as aliases because generic name inconsistencies between boot
environment and Solaris currently exist, especially for
sparc.
4.4 Interface Table
------------------------------------------------------------------------
Interface Level Comments
------------------------------------------------------------------------
path-oriented alias Uncommitted Allow an 'alias' to
be path below /devices
4.5 Changes to update_drv(1M) man page:
*** 212,218 ****
--- 209,222 ----
example# update_drv -a -P net_tcp -p \
'write_priv_set=net_tcp read_priv_set=net_tcp' tcp
+ Example 6 Establish a Path-oriented Alias
+ The following command establishes a path-oriented alias
+ to force a specific driver, qlt, to be used for a particular
+ device path.
+
+ update_drv -a -i '"/pci at 8,600000/SUNW,qlc at 4"' qlt
+
EXIT STATUS
The following exit values are returned:
6. Resources and Schedule
6.4. Steering Committee requested information
6.4.1. Consolidation C-team Name:
ON
6.5. ARC review type: FastTrack