BusLogic MultiMaster and FlashPoint SCSI Driver for Linux

Version 2.0.15 for Linux 2.0

Version 2.1.15 for Linux 2.1

PRODUCTION RELEASE

17 August 1998

Leonard N. Zubkoff

Dandelion Digital

lnz@dandelion.com

Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>

Introduction

BusLogic, Inc. designed and manufactured a variety of high performance SCSIhost adapters which share a common programming interface across a diversecollection of bus architectures by virtue of their MultiMaster ASIC technology.BusLogic was acquired by Mylex Corporation in February 1996, but the productssupported by this driver originated under the BusLogic name and so that name isretained in the source code and documentation.

This driver supports all present BusLogic MultiMaster Host Adapters, and shouldsupport any future MultiMaster designs with little or no modification. Morerecently, BusLogic introduced the FlashPoint Host Adapters, which are lesscostly and rely on the host CPU, rather than including an onboard processor.Despite not having an onboard CPU, the FlashPoint Host Adapters perform verywell and have very low command latency. BusLogic has recently provided me withthe FlashPoint Driver Developer’s Kit, which comprises documentation and freelyredistributable source code for the FlashPoint SCCB Manager. The SCCB Manageris the library of code that runs on the host CPU and performs functionsanalogous to the firmware on the MultiMaster Host Adapters. Thanks to theirhaving provided the SCCB Manager, this driver now supports the FlashPoint HostAdapters as well.

My primary goals in writing this completely new BusLogic driver for Linux areto achieve the full performance that BusLogic SCSI Host Adapters and modernSCSI peripherals are capable of, and to provide a highly robust driver that canbe depended upon for high performance mission critical applications. All ofthe major performance features can be configured from the Linux kernel commandline or at module initialization time, allowing individual installations totune driver performance and error recovery to their particular needs.

The latest information on Linux support for BusLogic SCSI Host Adapters, aswell as the most recent release of this driver and the latest firmware for theBT-948/958/958D, will always be available from my Linux Home Page at URL“http://sourceforge.net/projects/dandelion/”.

Bug reports should be sent via electronic mail to “lnz@dandelion.com”. Pleaseinclude with the bug report the complete configuration messages reported by thedriver and SCSI subsystem at startup, along with any subsequent system messagesrelevant to SCSI operations, and a detailed description of your system’shardware configuration.

Mylex has been an excellent company to work with and I highly recommend theirproducts to the Linux community. In November 1995, I was offered theopportunity to become a beta test site for their latest MultiMaster product,the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI WideUltra SCSI Host Adapter in January 1996. This was mutually beneficial sinceMylex received a degree and kind of testing that their own testing group cannotreadily achieve, and the Linux community has available high performance hostadapters that have been well tested with Linux even before being brought tomarket. This relationship has also given me the opportunity to interactdirectly with their technical staff, to understand more about the internalworkings of their products, and in turn to educate them about the needs andpotential of the Linux community.

More recently, Mylex has reaffirmed the company’s interest in supporting theLinux community, and I am now working on a Linux driver for the DAC960 PCI RAIDControllers. Mylex’s interest and support is greatly appreciated.

Unlike some other vendors, if you contact Mylex Technical Support with aproblem and are running Linux, they will not tell you that your use of theirproducts is unsupported. Their latest product marketing literature even states“Mylex SCSI host adapters are compatible with all major operating systemsincluding: … Linux …”.

Mylex Corporation is located at 34551 Ardenwood Blvd., Fremont, California94555, USA and can be reached at 510/796-6100 or on the World Wide Web athttp://www.mylex.com. Mylex HBA Technical Support can be reached by electronicmail attechsup@mylex.com, by Voice at 510/608-2400, or by FAX at 510/745-7715.Contact information for offices in Europe and Japan is available on the Website.

Driver Features

Configuration Reporting and Testing

During system initialization, the driver reports extensively on the hostadapter hardware configuration, including the synchronous transfer parametersrequested and negotiated with each target device. AutoSCSI settings forSynchronous Negotiation, Wide Negotiation, and Disconnect/Reconnect arereported for each target device, as well as the status of Tagged Queuing.If the same setting is in effect for all target devices, then a single wordor phrase is used; otherwise, a letter is provided for each target device toindicate the individual status. The following examplesshould clarify this reporting format:

Synchronous Negotiation: Ultra

Synchronous negotiation is enabled for all target devices and the hostadapter will attempt to negotiate for 20.0 mega-transfers/second.

Synchronous Negotiation: Fast

Synchronous negotiation is enabled for all target devices and the hostadapter will attempt to negotiate for 10.0 mega-transfers/second.

Synchronous Negotiation: Slow

Synchronous negotiation is enabled for all target devices and the hostadapter will attempt to negotiate for 5.0 mega-transfers/second.

Synchronous Negotiation: Disabled

Synchronous negotiation is disabled and all target devices are limited toasynchronous operation.

Synchronous Negotiation: UFSNUUU#UUUUUUUU

Synchronous negotiation to Ultra speed is enabled for target devices 0and 4 through 15, to Fast speed for target device 1, to Slow speed fortarget device 2, and is not permitted to target device 3. The hostadapter’s SCSI ID is represented by the “#”.

The status of Wide Negotiation, Disconnect/Reconnect, and Tagged Queuingare reported as “Enabled”, Disabled”, or a sequence of “Y” and “N” letters.

Performance Features

BusLogic SCSI Host Adapters directly implement SCSI-2 Tagged Queuing, and sosupport has been included in the driver to utilize tagged queuing with anytarget devices that report having the tagged queuing capability. Taggedqueuing allows for multiple outstanding commands to be issued to each targetdevice or logical unit, and can improve I/O performance substantially. Inaddition, BusLogic’s Strict Round Robin Mode is used to optimize host adapterperformance, and scatter/gather I/O can support as many segments as can beeffectively utilized by the Linux I/O subsystem. Control over the use oftagged queuing for each target device as well as individual selection of thetagged queue depth is available through driver options provided on the kernelcommand line or at module initialization time. By default, the queue depthis determined automatically based on the host adapter’s total queue depth andthe number, type, speed, and capabilities of the target devices found. Inaddition, tagged queuing is automatically disabled whenever the host adapterfirmware version is known not to implement it correctly, or whenever a taggedqueue depth of 1 is selected. Tagged queuing is also disabled for individualtarget devices if disconnect/reconnect is disabled for that device.

Robustness Features

The driver implements extensive error recovery procedures. When the higherlevel parts of the SCSI subsystem request that a timed out command be reset,a selection is made between a full host adapter hard reset and SCSI bus resetversus sending a bus device reset message to the individual target devicebased on the recommendation of the SCSI subsystem. Error recovery strategiesare selectable through driver options individually for each target device,and also include sending a bus device reset to the specific target deviceassociated with the command being reset, as well as suppressing errorrecovery entirely to avoid perturbing an improperly functioning device. Ifthe bus device reset error recovery strategy is selected and sending a busdevice reset does not restore correct operation, the next command that isreset will force a full host adapter hard reset and SCSI bus reset. SCSI busresets caused by other devices and detected by the host adapter are alsohandled by issuing a soft reset to the host adapter and re-initialization.Finally, if tagged queuing is active and more than one command reset occursin a 10 minute interval, or if a command reset occurs within the first 10minutes of operation, then tagged queuing will be disabled for that targetdevice. These error recovery options improve overall system robustness bypreventing individual errant devices from causing the system as a whole tolock up or crash, and thereby allowing a clean shutdown and restart after theoffending component is removed.

PCI Configuration Support

On PCI systems running kernels compiled with PCI BIOS support enabled, thisdriver will interrogate the PCI configuration space and use the I/O portaddresses assigned by the system BIOS, rather than the ISA compatible I/Oport addresses. The ISA compatible I/O port address is then disabled by thedriver. On PCI systems it is also recommended that the AutoSCSI utility beused to disable the ISA compatible I/O port entirely as it is not necessary.The ISA compatible I/O port is disabled by default on the BT-948/958/958D.

/proc File System Support

Copies of the host adapter configuration information together with updateddata transfer and error recovery statistics are available through the/proc/scsi/BusLogic/<N> interface.

Shared Interrupts Support

On systems that support shared interrupts, any number of BusLogic HostAdapters may share the same interrupt request channel.

Supported Host Adapters

The following list comprises the supported BusLogic SCSI Host Adapters as ofthe date of this document. It is recommended that anyone purchasing a BusLogicHost Adapter not in the following table contact the author beforehand to verifythat it is or will be supported.

FlashPoint Series PCI Host Adapters:

FlashPoint LT (BT-930)Ultra SCSI-3
FlashPoint LT (BT-930R)Ultra SCSI-3 with RAIDPlus
FlashPoint LT (BT-920)Ultra SCSI-3 (BT-930 without BIOS)
FlashPoint DL (BT-932)Dual Channel Ultra SCSI-3
FlashPoint DL (BT-932R)Dual Channel Ultra SCSI-3 with RAIDPlus
FlashPoint LW (BT-950)Wide Ultra SCSI-3
FlashPoint LW (BT-950R)Wide Ultra SCSI-3 with RAIDPlus
FlashPoint DW (BT-952)Dual Channel Wide Ultra SCSI-3
FlashPoint DW (BT-952R)Dual Channel Wide Ultra SCSI-3 with RAIDPlus

MultiMaster “W” Series Host Adapters:

BT-948PCIUltra SCSI-3
BT-958PCIWide Ultra SCSI-3
BT-958DPCIWide Differential Ultra SCSI-3

MultiMaster “C” Series Host Adapters:

BT-946CPCIFast SCSI-2
BT-956CPCIWide Fast SCSI-2
BT-956CDPCIWide Differential Fast SCSI-2
BT-445CVLBFast SCSI-2
BT-747CEISAFast SCSI-2
BT-757CEISAWide Fast SCSI-2
BT-757CDEISAWide Differential Fast SCSI-2
BT-545CISAFast SCSI-2
BT-540CFISAFast SCSI-2

MultiMaster “S” Series Host Adapters:

BT-445SVLBFast SCSI-2
BT-747SEISAFast SCSI-2
BT-747DEISADifferential Fast SCSI-2
BT-757SEISAWide Fast SCSI-2
BT-757DEISAWide Differential Fast SCSI-2
BT-545SISAFast SCSI-2
BT-542DISADifferential Fast SCSI-2
BT-742AEISASCSI-2 (742A revision H)
BT-542BISASCSI-2 (542B revision H)

MultiMaster “A” Series Host Adapters:

BT-742AEISASCSI-2 (742A revisions A - G)
BT-542BISASCSI-2 (542B revisions A - G)

AMI FastDisk Host Adapters that are true BusLogic MultiMaster clones are alsosupported by this driver.

BusLogic SCSI Host Adapters are available packaged both as bare boards and asretail kits. The BT- model numbers above refer to the bare board packaging.The retail kit model numbers are found by replacing BT- with KT- in the abovelist. The retail kit includes the bare board and manual as well as cabling anddriver media and documentation that are not provided with bare boards.

FlashPoint Installation Notes

RAIDPlus Support

FlashPoint Host Adapters now include RAIDPlus, Mylex’s bootable softwareRAID. RAIDPlus is not supported on Linux, and there are no plans to supportit. The MD driver in Linux 2.0 provides for concatenation (LINEAR) andstriping (RAID-0), and support for mirroring (RAID-1), fixed parity (RAID-4),and distributed parity (RAID-5) is available separately. The built-in LinuxRAID support is generally more flexible and is expected to perform betterthan RAIDPlus, so there is little impetus to include RAIDPlus support in theBusLogic driver.

Enabling UltraSCSI Transfers

FlashPoint Host Adapters ship with their configuration set to “FactoryDefault” settings that are conservative and do not allow for UltraSCSI speedto be negotiated. This results in fewer problems when these host adaptersare installed in systems with cabling or termination that is not sufficientfor UltraSCSI operation, or where existing SCSI devices do not properlyrespond to synchronous transfer negotiation for UltraSCSI speed. AutoSCSImay be used to load “Optimum Performance” settings which allow UltraSCSIspeed to be negotiated with all devices, or UltraSCSI speed can be enabled onan individual basis. It is recommended that SCAM be manually disabled afterthe “Optimum Performance” settings are loaded.

BT-948/958/958D Installation Notes

The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which mayrequire attention in some circumstances when installing Linux.

PCI I/O Port Assignments

When configured to factory default settings, the BT-948/958/958D will onlyrecognize the PCI I/O port assignments made by the motherboard’s PCI BIOS.The BT-948/958/958D will not respond to any of the ISA compatible I/O portsthat previous BusLogic SCSI Host Adapters respond to. This driver supportsthe PCI I/O port assignments, so this is the preferred configuration.However, if the obsolete BusLogic driver must be used for any reason, such asa Linux distribution that does not yet use this driver in its boot kernel,BusLogic has provided an AutoSCSI configuration option to enable a legacy ISAcompatible I/O port.

To enable this backward compatibility option, invoke the AutoSCSI utility viaCtrl-B at system startup and select “Adapter Configuration”, “View/ModifyConfiguration”, and then change the “ISA Compatible Port” setting from“Disable” to “Primary” or “Alternate”. Once this driver has been installed,the “ISA Compatible Port” option should be set back to “Disable” to avoidpossible future I/O port conflicts. The older BT-946C/956C/956CD also havethis configuration option, but the factory default setting is “Primary”.

PCI Slot Scanning Order

In systems with multiple BusLogic PCI Host Adapters, the order in which thePCI slots are scanned may appear reversed with the BT-948/958/958D ascompared to the BT-946C/956C/956CD. For booting from a SCSI disk to workcorrectly, it is necessary that the host adapter’s BIOS and the kernel agreeon which disk is the boot device, which requires that they recognize the PCIhost adapters in the same order. The motherboard’s PCI BIOS provides astandard way of enumerating the PCI host adapters, which is used by the Linuxkernel. Some PCI BIOS implementations enumerate the PCI slots in order ofincreasing bus number and device number, while others do so in the oppositedirection.

Unfortunately, Microsoft decided that Windows 95 would always enumerate thePCI slots in order of increasing bus number and device number regardless ofthe PCI BIOS enumeration, and requires that their scheme be supported by thehost adapter’s BIOS to receive Windows 95 certification. Therefore, thefactory default settings of the BT-948/958/958D enumerate the host adaptersby increasing bus number and device number. To disable this feature, invokethe AutoSCSI utility via Ctrl-B at system startup and select “AdapterConfiguration”, “View/Modify Configuration”, press Ctrl-F10, and then changethe “Use Bus And Device # For PCI Scanning Seq.” option to OFF.

This driver will interrogate the setting of the PCI Scanning Sequence optionso as to recognize the host adapters in the same order as they are enumeratedby the host adapter’s BIOS.

Enabling UltraSCSI Transfers

The BT-948/958/958D ship with their configuration set to “Factory Default”settings that are conservative and do not allow for UltraSCSI speed to benegotiated. This results in fewer problems when these host adapters areinstalled in systems with cabling or termination that is not sufficient forUltraSCSI operation, or where existing SCSI devices do not properly respondto synchronous transfer negotiation for UltraSCSI speed. AutoSCSI may beused to load “Optimum Performance” settings which allow UltraSCSI speed to benegotiated with all devices, or UltraSCSI speed can be enabled on anindividual basis. It is recommended that SCAM be manually disabled after the“Optimum Performance” settings are loaded.

Driver Options

BusLogic Driver Options may be specified either via the Linux Kernel CommandLine or via the Loadable Kernel Module Installation Facility. Driver Optionsfor multiple host adapters may be specified either by separating the optionstrings by a semicolon, or by specifying multiple “BusLogic=” strings on thecommand line. Individual option specifications for a single host adapter areseparated by commas. The Probing and Debugging Options apply to all hostadapters whereas the remaining options apply individually only to theselected host adapter.

The BusLogic Driver Probing Options comprise the following:

IO:<integer>

The “IO:” option specifies an ISA I/O Address to be probed for a non-PCIMultiMaster Host Adapter. If neither “IO:” nor “NoProbeISA” options arespecified, then the standard list of BusLogic MultiMaster ISA I/O Addresseswill be probed (0x330, 0x334, 0x230, 0x234, 0x130, and 0x134). Multiple“IO:” options may be specified to precisely determine the I/O Addresses tobe probed, but the probe order will always follow the standard list.

NoProbe

The “NoProbe” option disables all probing and therefore no BusLogic HostAdapters will be detected.

NoProbeISA

The “NoProbeISA” option disables probing of the standard BusLogic ISA I/OAddresses and therefore only PCI MultiMaster and FlashPoint Host Adapterswill be detected.

NoProbePCI

The “NoProbePCI” options disables the interrogation of PCI ConfigurationSpace and therefore only ISA Multimaster Host Adapters will be detected, aswell as PCI Multimaster Host Adapters that have their ISA Compatible I/OPort set to “Primary” or “Alternate”.

NoSortPCI

The “NoSortPCI” option forces PCI MultiMaster Host Adapters to beenumerated in the order provided by the PCI BIOS, ignoring any setting ofthe AutoSCSI “Use Bus And Device # For PCI Scanning Seq.” option.

MultiMasterFirst

The “MultiMasterFirst” option forces MultiMaster Host Adapters to be probedbefore FlashPoint Host Adapters. By default, if both FlashPoint and PCIMultiMaster Host Adapters are present, this driver will probe forFlashPoint Host Adapters first unless the BIOS primary disk is controlledby the first PCI MultiMaster Host Adapter, in which case MultiMaster HostAdapters will be probed first.

FlashPointFirst

The “FlashPointFirst” option forces FlashPoint Host Adapters to be probedbefore MultiMaster Host Adapters.

The BusLogic Driver Tagged Queuing Options allow for explicitly specifyingthe Queue Depth and whether Tagged Queuing is permitted for each TargetDevice (assuming that the Target Device supports Tagged Queuing). The QueueDepth is the number of SCSI Commands that are allowed to be concurrentlypresented for execution (either to the Host Adapter or Target Device). Notethat explicitly enabling Tagged Queuing may lead to problems; the option toenable or disable Tagged Queuing is provided primarily to allow disablingTagged Queuing on Target Devices that do not implement it correctly. Thefollowing options are available:

QueueDepth:<integer>

The “QueueDepth:” or QD:” option specifies the Queue Depth to use for allTarget Devices that support Tagged Queuing, as well as the maximum QueueDepth for devices that do not support Tagged Queuing. If no Queue Depthoption is provided, the Queue Depth will be determined automatically basedon the Host Adapter’s Total Queue Depth and the number, type, speed, andcapabilities of the detected Target Devices. For Host Adapters thatrequire ISA Bounce Buffers, the Queue Depth is automatically set by defaultto BusLogic_TaggedQueueDepthBB or BusLogic_UntaggedQueueDepthBB to avoidexcessive preallocation of DMA Bounce Buffer memory. Target Devices thatdo not support Tagged Queuing always have their Queue Depth set toBusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless alower Queue Depth option is provided. A Queue Depth of 1 automaticallydisables Tagged Queuing.

QueueDepth:[<integer>,<integer>…]

The “QueueDepth:[…]” or “QD:[…]” option specifies the Queue Depthindividually for each Target Device. If an <integer> is omitted, theassociated Target Device will have its Queue Depth selected automatically.

TaggedQueuing:Default

The “TaggedQueuing:Default” or “TQ:Default” option permits Tagged Queuingbased on the firmware version of the BusLogic Host Adapter and based onwhether the Queue Depth allows queuing multiple commands.

TaggedQueuing:Enable

The “TaggedQueuing:Enable” or “TQ:Enable” option enables Tagged Queuing forall Target Devices on this Host Adapter, overriding any limitation thatwould otherwise be imposed based on the Host Adapter firmware version.

TaggedQueuing:Disable

The “TaggedQueuing:Disable” or “TQ:Disable” option disables Tagged Queuingfor all Target Devices on this Host Adapter.

TaggedQueuing:<Target-Spec>

The “TaggedQueuing:<Target-Spec>” or “TQ:<Target-Spec>” option controlsTagged Queuing individually for each Target Device. <Target-Spec> is asequence of “Y”, “N”, and “X” characters. “Y” enables Tagged Queuing, “N”disables Tagged Queuing, and “X” accepts the default based on the firmwareversion. The first character refers to Target Device 0, the second toTarget Device 1, and so on; if the sequence of “Y”, “N”, and “X” charactersdoes not cover all the Target Devices, unspecified characters are assumedto be “X”.

The BusLogic Driver Miscellaneous Options comprise the following:

BusSettleTime:<seconds>

The “BusSettleTime:” or “BST:” option specifies the Bus Settle Time inseconds. The Bus Settle Time is the amount of time to wait between a HostAdapter Hard Reset which initiates a SCSI Bus Reset and issuing any SCSICommands. If unspecified, it defaults to BusLogic_DefaultBusSettleTime.

InhibitTargetInquiry

The “InhibitTargetInquiry” option inhibits the execution of an InquireTarget Devices or Inquire Installed Devices command on MultiMaster HostAdapters. This may be necessary with some older Target Devices that do notrespond correctly when Logical Units above 0 are addressed.

The BusLogic Driver Debugging Options comprise the following:

TraceProbe

The “TraceProbe” option enables tracing of Host Adapter Probing.

TraceHardwareReset

The “TraceHardwareReset” option enables tracing of Host Adapter HardwareReset.

TraceConfiguration

The “TraceConfiguration” option enables tracing of Host AdapterConfiguration.

TraceErrors

The “TraceErrors” option enables tracing of SCSI Commands that return anerror from the Target Device. The CDB and Sense Data will be printed foreach SCSI Command that fails.

Debug

The “Debug” option enables all debugging options.

The following examples demonstrate setting the Queue Depth for Target Devices1 and 2 on the first host adapter to 7 and 15, the Queue Depth for all TargetDevices on the second host adapter to 31, and the Bus Settle Time on thesecond host adapter to 30 seconds.

Linux Kernel Command Line:

linux BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30

LILO Linux Boot Loader (in /etc/lilo.conf):

append = "BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"

INSMOD Loadable Kernel Module Installation Facility:

insmod BusLogic.o \    'BusLogic="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"'

Note

Module Utilities 2.1.71 or later is required for correct parsingof driver options containing commas.

Driver Installation

This distribution was prepared for Linux kernel version 2.0.35, but should becompatible with 2.0.4 or any later 2.0 series kernel.

To install the new BusLogic SCSI driver, you may use the following commands,replacing “/usr/src” with wherever you keep your Linux kernel source tree:

cd /usr/srctar -xvzf BusLogic-2.0.15.tar.gzmv README.* LICENSE.* BusLogic.[ch] FlashPoint.c linux/drivers/scsipatch -p0 < BusLogic.patch (only for 2.0.33 and below)cd linuxmake configmake zImage

Then install “arch/x86/boot/zImage” as your standard kernel, run lilo ifappropriate, and reboot.

BusLogic Announcements Mailing List

The BusLogic Announcements Mailing List provides a forum for informing Linuxusers of new driver releases and other announcements regarding Linux supportfor BusLogic SCSI Host Adapters. To join the mailing list, send a message to“buslogic-announce-request@dandelion.com” with the line “subscribe” in themessage body.