2 .\" Copyright (c) 1995, Sun Microsystems, Inc.
3 .\" All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH FAS 7D "Jun 20, 1997"
9 fas \- FAS SCSI Host Bus Adapter Driver
13 fas@\fIsbus-slot\fR,0x8800000
19 The \fBfas\fR Host Bus Adapter driver is a \fBSCSA\fR compliant nexus driver
20 that supports the Qlogic FAS366 \fBSCSI\fR chip.
23 The \fBfas\fR driver supports the standard functions provided by the
24 \fBSCSA\fR interface. The driver supports tagged and untagged queuing, wide and
25 fast \fBSCSI,\fR almost unlimited transfer size (using a moving \fBDVMA\fR
26 window approach), and auto request sense; but it does not support linked
28 .SS "Driver Configuration"
31 The \fBfas\fR driver can be configured by defining properties in
32 \fBfas.conf\fR which override the global \fBSCSI\fR settings. Supported
33 properties are: \fBscsi-options\fR, \fBtarget<\fIn\fR>-scsi-options\fR,
34 \fBscsi-reset-delay\fR, \fBscsi-watchdog-tick\fR, \fBscsi-tag-age-limit\fR,
35 \fBscsi-initiator-id\fR.
38 \fBtarget<\fIn\fR>-scsi-options\fR overrides the \fBscsi-options\fR property
39 value for \fBtarget<\fIn\fR>\fR. <\fIn\fR> can vary from decimal \fB0\fR to
40 \fB15\fR. The supported \fBscsi-options\fR are: \fBSCSI_OPTIONS_DR\fR,
41 \fBSCSI_OPTIONS_SYNC\fR, \fBSCSI_OPTIONS_TAG\fR, \fBSCSI_OPTIONS_FAST\fR, and
42 \fBSCSI_OPTIONS_WIDE\fR.
45 After periodic interval \fBscsi-watchdog-tick\fR, the \fBfas\fR driver searches
46 all current and disconnected commands for timeouts.
49 \fBscsi-tag-age-limit\fR is the number of times that the \fBfas\fR driver
50 attempts to allocate a particular tag ID that is currently in use after going
51 through all tag IDs in a circular fashion. After finding the same tag ID in
52 use \fBscsi-tag-age-limit\fR times, no more commands will be submitted to this
53 target until all outstanding commands complete or timeout.
56 Refer to \fBscsi_hba_attach\fR(9F) for details.
59 \fBExample 1 \fRA sample of fas configuration file
62 Create a file called \fB/kernel/drv/fas.conf\fR and add this line:
66 \fBscsi-options=0x78;\fR
70 This disables tagged queuing, Fast \fBSCSI,\fR and Wide mode for all \fBfas\fR
71 instances. The following example disables an option for one specific \fBfas\fR
72 (refer to \fBdriver.conf\fR(4) for more details):
77 name="fas" parent="/iommu@f,e0000000/sbus@f,e0001000"
78 reg=3,0x8800000,0x10,3,0x8810000,0x40
79 target1-scsi-options=0x58
80 scsi-options=0x178 scsi-initiator-id=6;
86 Note that the default initiator ID in OBP is 7 and that the change to ID 6 will
87 occur at attach time. It may be preferable to change the initiator ID in OBP.
91 The example above sets \fBscsi-options\fR for target 1 to \fB0x58\fR and all
92 other targets on this \fBSCSI\fR bus to \fB0x178\fR.
96 The physical pathname of the parent can be determined using the \fB/devices\fR
97 tree or following the link of the logical device name:
102 # ls \fB-l\fR /dev/rdsk/c1t3d0s0
103 lrwxrwxrwx 1 root other 78 Aug 28 16:05 /dev/rdsk/c1t3d0s0 ->
105 \&.\|.\|/.\|.\|/devices/iommu@f,e0000000\
106 sbus@f,e0001000/SUNW,fas@3,8800000/sd@3,0:a,raw
112 Determine the register property values using the output from \fBprtconf\fR(1M)
113 (with the \fB-v\fR option):
118 SUNW,fas, instance #0
120 Register Specifications:
121 Bus Type=0x3, Address=0x8800000, Size=10
122 Bus Type=0x3, Address=0x8810000, Size=40
128 \fBscsi-options\fR can also be specified per device type using the device
129 inquiry string. All the devices with the same inquiry string will have the same
130 \fBscsi-options\fR set. This can be used to disable some \fBscsi-options\fR on
131 all the devices of the same type.
136 device-type-scsi-options-list=
137 "TOSHIBA XM5701TASUN12XCD", "cd-scsi-options";
138 cd-scsi-options = 0x0;
144 The above entry in \fB/kernel/drv/fas.conf\fR sets the \fBscsi-options\fR for
145 all devices with inquiry string \fBTOSHIBA XM5701TASUN12XCD\fR to
146 \fBcd-scsi-options\fR. To get the inquiry string, run the \fBprobe-scsi\fR or
147 \fBprobe-scsi-all\fR command at the \fBok\fR prompt before booting the system.
151 To set \fBscsi-options\fR more specifically per target:
156 target1-scsi-options=0x78;
157 device-type-scsi-options-list =
158 "SEAGATE ST32550W", "seagate-scsi-options" ;
159 seagate-scsi-options = 0x58;
166 The above sets \fBscsi-options\fR for target 1 to \fB0x78\fR and for all other
167 targets on this \fBSCSI\fR bus to \fB0x3f8\fR except for one specific disk type
168 which will have \fBscsi-options\fR set to \fB0x58\fR.
172 \fBscsi-options\fR specified per target ID have the highest precedence,
173 followed by \fBscsi-options\fR per device type. Global \fBfas scsi-options\fR
174 (effecting all instances) per bus have the lowest precedence.
178 The system needs to be rebooted before the specified \fBscsi-options\fR take
181 .SS "Driver Capabilities"
184 The target driver needs to set capabilities in the \fBfas\fR driver in order to
185 enable some driver features. The target driver can query and modify these
186 capabilities: \fBsynchronous\fR, \fBtagged-qing\fR, \fBwide-xfer\fR,
187 \fBauto-rqsense\fR, \fBqfull-retries\fR, \fBqfull-retry-interval\fR. All other
188 capabilities can only be queried.
191 By default, \fBtagged-qing\fR, \fBauto-rqsense\fR, and \fBwide-xfer\fR
192 capabilities are disabled, while \fBdisconnect\fR, \fBsynchronous\fR, and
193 \fBuntagged-qing\fR are enabled. These capabilities can only have binary values
194 (\fB0\fR or \fB1\fR). The default value for \fBqfull-retries\fR is \fB10\fR and
195 the default value for \fBqfull-retry-interval\fR is \fB100\fR. The
196 \fBqfull-retries\fR capability is a \fBuchar_t\fR (\fB0\fR to \fB255\fR) while
197 \fBqfull-retry-interval\fR is a \fBushort_t\fR (\fB0\fR to \fB65535\fR).
200 The target driver needs to enable \fBtagged-qing\fR and \fBwide-xfer\fR
201 explicitly. The \fBuntagged-qing\fR capability is always enabled and its value
202 cannot be modified, because \fBfas\fR can queue commands even when
203 \fBtagged-qing\fR is disabled.
206 Whenever there is a conflict between the value of \fBscsi-options\fR and a
207 capability, the value set in \fBscsi-options\fR prevails. Only \fBwhom != 0\fR
208 is supported in the \fBscsi_ifsetcap\fR(9F) call.
211 Refer to \fBscsi_ifsetcap\fR(9F) and \fBscsi_ifgetcap\fR(9F) for details.
216 \fB\fB/kernel/drv/fas\fR\fR
219 \fBELF\fR Kernel Module
225 \fB\fB/kernel/drv/fas.conf\fR\fR
228 Optional configuration file
234 See \fBattributes\fR(5) for descriptions of the following attributes:
242 ATTRIBUTE TYPE ATTRIBUTE VALUE
245 Limited to Sparc SBus-based systems with FAS366-based SCSI port and SunSWIFT SBus SCSI Host Adapter/Fast Ethernet option.
252 \fBprtconf\fR(1M), \fBdriver.conf\fR(4), \fBattributes\fR(5),
253 \fBscsi_abort\fR(9F), \fBscsi_hba_attach\fR(9F), \fBscsi_ifgetcap\fR(9F),
254 \fBscsi_ifsetcap\fR(9F), \fBscsi_reset\fR(9F), \fBscsi_sync_pkt\fR(9F),
255 \fBscsi_transport\fR(9F), \fBscsi_device\fR(9S), \fBscsi_extended_sense\fR(9S),
256 \fBscsi_inquiry\fR(9S), \fBscsi_pkt\fR(9S)
259 \fIWriting Device Drivers\fR
262 \fIANSI Small Computer System Interface-2 (SCSI-2)\fR
265 QLogic Corporation, \fIFAS366 Technical Manuals\fR.
269 The messages described below are some that may appear on the system console, as
270 well as being logged.
273 The first five messages may be displayed while the \fBfas\fR driver is trying
274 to attach; these messages mean that the \fBfas\fR driver was unable to attach.
275 All of these messages are preceded by "fas%d", where "%d" is the instance
276 number of the \fBfas\fR controller.
280 \fBDevice in slave-only slot\fR
284 The SBus device has been placed in a slave-only slot and will not be
285 accessible; move to non-slave-only SBus slot.
291 \fBDevice is using a hilevel intr\fR
295 The device was configured with an interrupt level that cannot be used with this
296 \fBfas\fR driver. Check the SBus device.
302 \fBCannot alloc dma handle\fR
306 Driver was unable to allocate memory for a DMA controller.
312 \fBCannot alloc cmd area\fR
316 Driver was unable to allocate memory for a command address.
322 \fBCannot create kmem_cache\fR
326 Driver was unable to allocate memory for internal data structures.
332 \fBUnable to map FAS366 registers\fR
336 Driver was unable to map device registers; check for bad hardware. Driver did
337 not attach to device; \fBSCSI\fR devices will be inaccessible.
343 \fBCannot add intr\fR
347 Driver could not add its interrupt service routine to the kernel.
357 Driver was unable to locate a \fBDMA\fR controller. This is an
358 auto-configuration error.
364 \fBCannot bind cmdarea\fR
368 Driver was unable to bind the \fBDMA\fR handle to an address.
374 \fBCannot create devctl minor node\fR
378 Driver is unable to create a minor node for the controller.
388 The driver was unable to attach; usually follows another warning that indicates
395 \fBDisabled TQ since disconnects are disabled\fR
399 Tagged queuing was disabled because disconnects were disabled in
406 \fBBad clock frequency\fR
410 Check for bad hardware.
416 \fBSync of pkt (<address>) failed\fR
420 Syncing a \fBSCSI\fR packet failed. Refer to \fBscsi_sync_pkt\fR(9F).
426 \fBAll tags in use!\fR
430 The driver could not allocate another tag number. The target devices do not
431 properly support tagged queuing.
437 \fBGross error in FAS366 status\fR
441 The driver experienced severe \fBSCSI\fR bus problems. Check cables and
448 \fBSpurious interrupt\fR
452 The driver received an interrupt while the hardware was not interrupting.
458 \fBLost state in phasemanage\fR
462 The driver is confused about the state of the \fBSCSI\fR bus.
468 \fBUnrecoverable DMA \fBerror\fR \fBduring selection\fR\fR
472 The \fBDMA\fR controller experienced host SBus problems. Check for bad
479 \fBBad sequence step (<step number>) in selection\fR
483 The FAS366 hardware reported a bad sequence step. Check for bad hardware.
489 \fBUndetermined selection failure\fR
493 The selection of a target failed unexpectedly. Check for bad hardware.
499 \fBTarget <n>: failed reselection (bad reselect bytes)\fR
503 A reconnect failed, target sent incorrect number of message bytes. Check for
510 \fBTarget <n>: failed reselection (bad identify message)\fR
514 A reconnect failed, target didn't send identify message or it got corrupted.
515 Check for bad hardware.
521 \fBTarget <n>: failed reselection (not in msgin phase)\fR
525 Incorrect \fBSCSI\fR bus phase after reconnection. Check for bad hardware.
531 \fBTarget <n>: failed reselection (unexpected bus free)\fR
535 Incorrect \fBSCSI\fR bus phase after reconnection. Check for bad hardware.
541 \fBTarget <n>: failed reselection (timeout on receiving tag msg)\fR
545 A reconnect failed; target failed to send tag bytes. Check for bad hardware.
551 \fBTarget <n>: failed reselection (botched tag)\fR
555 A reconnect failed; target failed to send tag bytes. Check for bad hardware.
561 \fBTarget <n>: failed reselection (invalid tag)\fR
565 A reconnect failed; target sent incorrect tag bytes. Check for bad hardware.
571 \fBTarget <n>: failed reselection (Parity error in reconnect msg's)\fR
575 A reconnect failed; parity error detected. Check for bad hardware.
581 \fBTarget <n>: failed reselection (no command)\fR
585 A reconnect failed; target accepted \fBabort\fR or \fBreset\fR, but still tries
586 to reconnect. Check for bad hardware.
592 \fBUnexpected bus free\fR
596 Target disconnected from the bus without notice. Check for bad hardware.
602 \fBTarget <n> didn't disconnect after sending <message>\fR
606 The target unexpectedly did not disconnect after sending
607 \fB<\fR\fImessage\fR\fB>.\fR
613 \fBBad sequence step (0x?) in selection\fR
617 The sequence step register shows an improper value. The target might be
624 \fBIllegal dma boundary?\fR
628 An attempt was made to cross a boundary that the driver could not handle.
634 \fBUnwanted data xfer direction for Target <n>\fR
638 The target went into an unexpected phase.
644 \fBUnrecoverable DMA error on dma <send/receive>\fR
648 There is a \fBDMA\fR error while sending/receiving data. The host \fBDMA\fR
649 controller is experiencing some problems.
655 \fBSCSI bus DATA IN phase parity error\fR
659 The driver detected parity errors on the \fBSCSI\fR bus.
665 \fBSCSI bus MESSAGE IN phase parity error\fR
669 The driver detected parity errors on the \fBSCSI\fR bus.
675 \fBSCSI bus STATUS phase parity \fBerror\fR\fR
679 The driver detected parity errors on the \fBSCSI\fR bus.
685 \fBPremature end of extended message\fR
689 An extended \fBSCSI\fR bus message did not complete. Suspect a target firmware
696 \fBPremature end of input message\fR
700 A multibyte input message was truncated. Suspect a target firmware problem.
706 \fBInput message botch\fR
710 The driver is confused about messages coming from the target.
716 \fBExtended message <n> is too long\fR
720 The extended message sent by the target is longer than expected.
726 \fB<name> message <n> from Target <m> garbled\fR
730 Target \fB<\fR\fIm\fR\fB>\fR sent message \fB<\fR\fIname\fR\fB>\fR of value
731 \fB<\fR\fIn\fR\fB>\fR which the driver did not understand.
737 \fBTarget <n> rejects our message <name>\fR
741 Target \fB<\fR\fIn\fR\fB>\fR rejected a message sent by the driver.
747 \fBRejecting message <name> from Target <n>\fR
751 The driver rejected a message received from target \fB<\fR\fIn\fR\fB>.\fR
757 \fBCmd transmission \fBerror\fR\fR
761 The driver was unable to send out command bytes.
767 \fBTarget <n> refused message resend\fR
771 The target did not accept a message resend.
777 \fBMESSAGE OUT phase parity error\fR
781 The driver detected parity errors on the SCSI bus.
787 \fBTwo byte message <name> <value> rejected\fR
791 The driver does not accept this two byte message.
797 \fBGross error in fas status <stat>\fR
801 The \fBfas\fR chip has indicated a gross error like \fBFIFO\fR overflow.
807 \fBPolled cmd failed (target busy)\fR
811 A polled command failed because the target did not complete outstanding
812 commands within a reasonable time.
818 \fBPolled cmd failed\fR
822 A polled command failed because of timeouts or bus errors.
828 \fBAuto request sense failed\fR
832 Driver is unable to get request sense from the target.
838 \fBDisconnected command timeout for Target <id>.<lun>\fR
842 A timeout occurred while target \fBid\fR/\fIlun\fR was disconnected. This is
843 usually a target firmware problem. For tagged queuing targets,
844 \fB<\fR\fIn\fR\fB>\fR commands were outstanding when the timeout was detected.
850 \fBDisconnected tagged cmds (<n>) timeout for Target <id>.<lun>\fR
854 A timeout occurred while target \fBid\fR/\fIlun\fR was disconnected. This is
855 usually a target firmware problem. For tagged queuing targets,
856 \fB<\fR\fIn\fR\fB>\fR commands were outstanding when the timeout was detected.
862 \fBConnected command timeout for Target <id>.<lun>\fR
866 This is usually a \fBSCSI\fR bus problem. Check cables and termination.
872 \fBTarget <id>.<lun> reverting to async. mode\fR
876 A data transfer hang was detected. The driver attempts to eliminate this
877 problem by reducing the data transfer rate.
883 \fBTarget <id>.<lun> reducing sync. transfer rate\fR
887 A data transfer hang was detected. The driver attempts to eliminate this
888 problem by reducing the data transfer rate.
894 \fBReverting to slow SCSI cable mode\fR
898 A data transfer hang was detected. The driver attempts to eliminate this
899 problem by reducing the data transfer rate.
905 \fBTarget <id> reducing sync. transfer rate\fR
909 A data transfer hang was detected. The driver attempts to eliminate this
910 problem by reducing the data transfer rate.
916 \fBTarget <id> reverting to async. mode\fR
920 A data transfer hang was detected. The driver attempts to eliminate this
921 problem by reducing the data transfer rate.
927 \fBTarget <id> disabled wide SCSI mode\fR
931 Due to problems on the \fBSCSI\fR bus, the driver goes into more conservative
932 mode of operation to avoid further problems.
938 \fBReset SCSI bus failed\fR
942 An attempt to reset the \fBSCSI\fR bus failed.
948 \fBExternal SCSI bus reset\fR
952 Another initiator reset the \fBSCSI\fR bus.
958 The \fBfas\fR hardware (FAS366) supports both Wide and Fast \fBSCSI\fR mode,
959 but fast20 is not supported. The maximum \fBSCSI\fR bandwidth is 20 MB/sec.
960 Initiator mode block sequence (IBS) is not supported.
964 The \fBfas\fR driver exports properties indicating per target the negotiated
965 transfer speed (\fBtarget<n>-sync-speed\fR), whether wide bus is supported
966 (\fBtarget<n>-wide\fR), \fBscsi-options\fR for that particular target
967 (\fBtarget<n>-scsi-options\fR), and whether tagged queuing has been enabled
968 (\fBtarget<n>-TQ\fR). The \fBsync-speed\fR property value is the data transfer
969 rate in KB/sec. The \fBtarget<n>-TQ\fR and the \fBtarget<n>-wide\fR property
970 have value \fB1\fR to indicate that the corresponding capability is enabled, or
971 \fB0\fR to indicate that the capability is disabled for that target. Refer to
972 \fBprtconf\fR(1M) (verbose option) for viewing the \fBfas\fR properties.
977 Driver software properties:
978 name <target3-TQ> length <4>
980 name <target3-wide> length <4>
982 name <target3-sync-speed> length <4>
984 name <target3-scsi-options> length <4>
986 name <target0-TQ> length <4>
988 name <pm_norm_pwr> length <4>
990 name <pm_timestamp> length <4>
992 name <scsi-options> length <4>
994 name <scsi-watchdog-tick> length <4>
996 name <scsi-tag-age-limit> length <4>
998 name <scsi-reset-delay> length <4>
1000 Register Specifications:
1001 Bus Type=0x3, Address=0x8800000, Size=10
1002 Bus Type=0x3, Address=0x8810000, Size=40
1003 Interrupt Specifications:
1004 Interrupt Priority=0x35 (ipl 5)