Copyright (c) 1995, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
fas@sbus-slot,0x8800000
The fas Host Bus Adapter driver is a SCSA compliant nexus driver that supports the Qlogic FAS366 SCSI chip.
The fas driver supports the standard functions provided by the SCSA interface. The driver supports tagged and untagged queuing, wide and fast SCSI, almost unlimited transfer size (using a moving DVMA window approach), and auto request sense; but it does not support linked commands.
The fas driver can be configured by defining properties in fas.conf which override the global SCSI settings. Supported properties are: scsi-options, target<n>-scsi-options, scsi-reset-delay, scsi-watchdog-tick, scsi-tag-age-limit, scsi-initiator-id.
target<n>-scsi-options overrides the scsi-options property value for target<n>. <n> can vary from decimal 0 to 15. The supported scsi-options are: SCSI_OPTIONS_DR, SCSI_OPTIONS_SYNC, SCSI_OPTIONS_TAG, SCSI_OPTIONS_FAST, and SCSI_OPTIONS_WIDE.
After periodic interval scsi-watchdog-tick, the fas driver searches all current and disconnected commands for timeouts.
scsi-tag-age-limit is the number of times that the fas driver attempts to allocate a particular tag ID that is currently in use after going through all tag IDs in a circular fashion. After finding the same tag ID in use scsi-tag-age-limit times, no more commands will be submitted to this target until all outstanding commands complete or timeout.
Refer to scsi_hba_attach(9F) for details.
Example 1 A sample of fas configuration file
Create a file called /kernel/drv/fas.conf and add this line:
scsi-options=0x78;
This disables tagged queuing, Fast SCSI, and Wide mode for all fas instances. The following example disables an option for one specific fas (refer to driver.conf(4) for more details):
name="fas" parent="/iommu@f,e0000000/sbus@f,e0001000" reg=3,0x8800000,0x10,3,0x8810000,0x40 target1-scsi-options=0x58 scsi-options=0x178 scsi-initiator-id=6;
Note that the default initiator ID in OBP is 7 and that the change to ID 6 will occur at attach time. It may be preferable to change the initiator ID in OBP.
The example above sets scsi-options for target 1 to 0x58 and all other targets on this SCSI bus to 0x178.
The physical pathname of the parent can be determined using the /devices tree or following the link of the logical device name:
# ls -l /dev/rdsk/c1t3d0s0 lrwxrwxrwx 1 root other 78 Aug 28 16:05 /dev/rdsk/c1t3d0s0 -> .\|.\|/.\|.\|/devices/iommu@f,e0000000\ sbus@f,e0001000/SUNW,fas@3,8800000/sd@3,0:a,raw
Determine the register property values using the output from prtconf(1M) (with the -v option):
SUNW,fas, instance #0 \|.\|.\|.\|. Register Specifications: Bus Type=0x3, Address=0x8800000, Size=10 Bus Type=0x3, Address=0x8810000, Size=40
scsi-options can also be specified per device type using the device inquiry string. All the devices with the same inquiry string will have the same scsi-options set. This can be used to disable some scsi-options on all the devices of the same type.
device-type-scsi-options-list= "TOSHIBA XM5701TASUN12XCD", "cd-scsi-options"; cd-scsi-options = 0x0;
The above entry in /kernel/drv/fas.conf sets the scsi-options for all devices with inquiry string TOSHIBA XM5701TASUN12XCD to cd-scsi-options. To get the inquiry string, run the probe-scsi or probe-scsi-all command at the ok prompt before booting the system.
To set scsi-options more specifically per target:
target1-scsi-options=0x78; device-type-scsi-options-list = "SEAGATE ST32550W", "seagate-scsi-options" ; seagate-scsi-options = 0x58; scsi-options=0x3f8;
The above sets scsi-options for target 1 to 0x78 and for all other targets on this SCSI bus to 0x3f8 except for one specific disk type which will have scsi-options set to 0x58.
scsi-options specified per target ID have the highest precedence, followed by scsi-options per device type. Global fas scsi-options (effecting all instances) per bus have the lowest precedence.
The system needs to be rebooted before the specified scsi-options take effect.
The target driver needs to set capabilities in the fas driver in order to enable some driver features. The target driver can query and modify these capabilities: synchronous, tagged-qing, wide-xfer, auto-rqsense, qfull-retries, qfull-retry-interval. All other capabilities can only be queried.
By default, tagged-qing, auto-rqsense, and wide-xfer capabilities are disabled, while disconnect, synchronous, and untagged-qing are enabled. These capabilities can only have binary values (0 or 1). The default value for qfull-retries is 10 and the default value for qfull-retry-interval is 100. The qfull-retries capability is a uchar_t (0 to 255) while qfull-retry-interval is a ushort_t (0 to 65535).
The target driver needs to enable tagged-qing and wide-xfer explicitly. The untagged-qing capability is always enabled and its value cannot be modified, because fas can queue commands even when tagged-qing is disabled.
Whenever there is a conflict between the value of scsi-options and a capability, the value set in scsi-options prevails. Only whom != 0 is supported in the scsi_ifsetcap(9F) call.
Refer to scsi_ifsetcap(9F) and scsi_ifgetcap(9F) for details.
ELF Kernel Module
Optional configuration file
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Architecture |
Limited to Sparc SBus-based systems with FAS366-based SCSI port and SunSWIFT SBus SCSI Host Adapter/Fast Ethernet option. |
prtconf(1M), driver.conf(4), attributes(5), scsi_abort(9F), scsi_hba_attach(9F), scsi_ifgetcap(9F), scsi_ifsetcap(9F), scsi_reset(9F), scsi_sync_pkt(9F), scsi_transport(9F), scsi_device(9S), scsi_extended_sense(9S), scsi_inquiry(9S), scsi_pkt(9S)
Writing Device Drivers
ANSI Small Computer System Interface-2 (SCSI-2)
QLogic Corporation, FAS366 Technical Manuals.
The messages described below are some that may appear on the system console, as well as being logged.
The first five messages may be displayed while the fas driver is trying to attach; these messages mean that the fas driver was unable to attach. All of these messages are preceded by "fas%d", where "%d" is the instance number of the fas controller. Device in slave-only slot
The SBus device has been placed in a slave-only slot and will not be accessible; move to non-slave-only SBus slot.
The device was configured with an interrupt level that cannot be used with this fas driver. Check the SBus device.
Driver was unable to allocate memory for a DMA controller.
Driver was unable to allocate memory for a command address.
Driver was unable to allocate memory for internal data structures.
Driver was unable to map device registers; check for bad hardware. Driver did not attach to device; SCSI devices will be inaccessible.
Driver could not add its interrupt service routine to the kernel.
Driver was unable to locate a DMA controller. This is an auto-configuration error.
Driver was unable to bind the DMA handle to an address.
Driver is unable to create a minor node for the controller.
The driver was unable to attach; usually follows another warning that indicates why attach failed.
Tagged queuing was disabled because disconnects were disabled in scsi-options.
Check for bad hardware.
Syncing a SCSI packet failed. Refer to scsi_sync_pkt(9F).
The driver could not allocate another tag number. The target devices do not properly support tagged queuing.
The driver experienced severe SCSI bus problems. Check cables and terminator.
The driver received an interrupt while the hardware was not interrupting.
The driver is confused about the state of the SCSI bus.
The DMA controller experienced host SBus problems. Check for bad hardware.
The FAS366 hardware reported a bad sequence step. Check for bad hardware.
The selection of a target failed unexpectedly. Check for bad hardware.
A reconnect failed, target sent incorrect number of message bytes. Check for bad hardware.
A reconnect failed, target didn't send identify message or it got corrupted. Check for bad hardware.
Incorrect SCSI bus phase after reconnection. Check for bad hardware.
Incorrect SCSI bus phase after reconnection. Check for bad hardware.
A reconnect failed; target failed to send tag bytes. Check for bad hardware.
A reconnect failed; target failed to send tag bytes. Check for bad hardware.
A reconnect failed; target sent incorrect tag bytes. Check for bad hardware.
A reconnect failed; parity error detected. Check for bad hardware.
A reconnect failed; target accepted abort or reset, but still tries to reconnect. Check for bad hardware.
Target disconnected from the bus without notice. Check for bad hardware.
The target unexpectedly did not disconnect after sending <message>.
The sequence step register shows an improper value. The target might be misbehaving.
An attempt was made to cross a boundary that the driver could not handle.
The target went into an unexpected phase.
There is a DMA error while sending/receiving data. The host DMA controller is experiencing some problems.
The driver detected parity errors on the SCSI bus.
The driver detected parity errors on the SCSI bus.
The driver detected parity errors on the SCSI bus.
An extended SCSI bus message did not complete. Suspect a target firmware problem.
A multibyte input message was truncated. Suspect a target firmware problem.
The driver is confused about messages coming from the target.
The extended message sent by the target is longer than expected.
Target <m> sent message <name> of value <n> which the driver did not understand.
Target <n> rejected a message sent by the driver.
The driver rejected a message received from target <n>.
The driver was unable to send out command bytes.
The target did not accept a message resend.
The driver detected parity errors on the SCSI bus.
The driver does not accept this two byte message.
The fas chip has indicated a gross error like FIFO overflow.
A polled command failed because the target did not complete outstanding commands within a reasonable time.
A polled command failed because of timeouts or bus errors.
Driver is unable to get request sense from the target.
A timeout occurred while target id/lun was disconnected. This is usually a target firmware problem. For tagged queuing targets, <n> commands were outstanding when the timeout was detected.
A timeout occurred while target id/lun was disconnected. This is usually a target firmware problem. For tagged queuing targets, <n> commands were outstanding when the timeout was detected.
This is usually a SCSI bus problem. Check cables and termination.
A data transfer hang was detected. The driver attempts to eliminate this problem by reducing the data transfer rate.
A data transfer hang was detected. The driver attempts to eliminate this problem by reducing the data transfer rate.
A data transfer hang was detected. The driver attempts to eliminate this problem by reducing the data transfer rate.
A data transfer hang was detected. The driver attempts to eliminate this problem by reducing the data transfer rate.
A data transfer hang was detected. The driver attempts to eliminate this problem by reducing the data transfer rate.
Due to problems on the SCSI bus, the driver goes into more conservative mode of operation to avoid further problems.
An attempt to reset the SCSI bus failed.
Another initiator reset the SCSI bus.
The fas hardware (FAS366) supports both Wide and Fast SCSI mode, but fast20 is not supported. The maximum SCSI bandwidth is 20 MB/sec. Initiator mode block sequence (IBS) is not supported.
The fas driver exports properties indicating per target the negotiated transfer speed (target<n>-sync-speed), whether wide bus is supported (target<n>-wide), scsi-options for that particular target (target<n>-scsi-options), and whether tagged queuing has been enabled (target<n>-TQ). The sync-speed property value is the data transfer rate in KB/sec. The target<n>-TQ and the target<n>-wide property have value 1 to indicate that the corresponding capability is enabled, or 0 to indicate that the capability is disabled for that target. Refer to prtconf(1M) (verbose option) for viewing the fas properties.
SUNW,fas,instance #1 Driver software properties: name <target3-TQ> length <4> value <0x00000001>. name <target3-wide> length <4> value <0x00000000>. name <target3-sync-speed> length <4> value <0x00002710>. name <target3-scsi-options> length <4> value <0x000003f8>. name <target0-TQ> length <4> value <0x00000001>. name <pm_norm_pwr> length <4> value <0x00000001>. name <pm_timestamp> length <4> value <0x30040346>. name <scsi-options> length <4> value <0x000003f8>. name <scsi-watchdog-tick> length <4> value <0x0000000a>. name <scsi-tag-age-limit> length <4> value <0x00000002>. name <scsi-reset-delay> length <4> value <0x00000bb8>. Register Specifications: Bus Type=0x3, Address=0x8800000, Size=10 Bus Type=0x3, Address=0x8810000, Size=40 Interrupt Specifications: Interrupt Priority=0x35 (ipl 5)