Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info.

SCSI Manager 4.3

From Higher Intellect Vintage Wiki
Jump to navigation Jump to search

SCSI Manager 4.3 is an enhanced version of the SCSI Manager that provides new features as well as compatibility with the original version. SCSI Manager 4.3 is contained in the ROM of high-performance computers such as the Macintosh Quadra 840AV and the Power Macintosh 8100/80. Beginning with system software version 7.5, SCSI Manager 4.3 is also available as a system extension that can be installed in any Macintosh computer that uses the NCR 53C96 SCSI controller chip.

In addition to the capabilities of the original SCSI Manager, SCSI Manager 4.3 provides

  • support for asynchronous SCSI I/O
  • support for optional SCSI features such as disconnect/reconnect
  • a hardware-independent programming interface that minimizes the SCSI-specific tasks a device driver must perform

The SCSI Manager 4.3 application program interface (API) is modeled on the Common Access Method (CAM) software interface being developed by ANSI committee X3T9. The SCSI Manager 4.3 interface, however, includes Apple-specific differences required for compatibility with the original SCSI Manager and the Macintosh Operating System.

The CAM specification defines the operation of three functional units—the transport (XPT), the SCSI interface module (SIM), and the host bus adapter (HBA). The XPT is the entry point to SCSI Manager 4.3 and is responsible for passing requests to the appropriate SIM. Each SIM is responsible for managing the HBA for a particular bus.

In addition to the XPT, SCSI Manager 4.3 includes a SIM for managing the NCR 53C96 SCSI controller used in high-performance Macintosh computers. Other SIM modules and HBA hardware can be added at any time by Apple or third-party developers. For example, a NuBus or PDS expansion card can provide an additional SCSI bus, which device drivers can access through SCSI Manager 4.3 in exactly the same way as the internal bus.

The features and capabilities of SCSI Manager 4.3 include

  • SCSI-2 compliance. All mandatory SCSI-2 messages and protocol actions are supported as defined for an initiator. Optional SCSI-2 hardware features, such as fast and wide transfers, are anticipated by the SCSI Manager 4.3 architecture and supported by the interface.
  • Concurrent asynchronous I/O. SCSI Manager 4.3 handles both synchronous and asynchronous I/O requests. In addition, it allows multiple device drivers to issue multiple requests and attempts to overlap the operations as much as possible.
  • Hardware-independent programming interface. A new hardware-independent interface allows device drivers to work with any SCSI Manager 4.3-compatible host bus adapter (HBA), including those from third-party developers.
  • Direct memory access (DMA). SCSI Manager 4.3 automatically takes advantage of the DMA capabilities available in high-performance Macintosh models. Direct memory access allows the computer to perform other functions while data bytes are transferred to or from the SCSI bus.
  • Support for multiple buses. SCSI Manager 4.3 supports any number of SCSI buses, each with a full complement of devices. For example, on Macintosh computers with dual SCSI buses (such as the Power Macintosh 8100/80), up to 14 SCSI devices can be attached. In addition, developers can design NuBus or PDS expansion cards that offer enhanced SCSI bus capabilities.
  • Support for multiple logical units on each target. SCSI Manager 4.3 allows access to all logical units on a target device. Logical units are treated as separate entities, and I/O requests are queued according to logical unit number (LUN).
  • Disconnect/reconnect. This capability helps maximize SCSI bus utilization by allowing a device to disconnect and release control of the SCSI bus while it processes a command, then reconnect when it is ready to complete the transaction. This allows a device driver to submit requests to multiple targets so that those requests are executed in parallel. For example, the driver for a disk array can issue a request to one disk, which disconnects, then issue another request to a different disk. The two disks can perform their seek operations simultaneously, reducing the effective seek time.
  • Parity detection. SCSI Manager 4.3 detects and handles parity errors in data received from a target. For compatibility reasons, this feature can be disabled on a per- transaction basis. (All Macintosh computers generate parity for write operations, but the original SCSI Manager does not detect parity errors in incoming data.)
  • Autosense. SCSI Manager 4.3 automatically sends a REQUEST SENSE command in response to a CHECK CONDITION status and retrieves the sense data. This feature can be disabled.
  • Compatibility. SCSI Manager 4.3 supports all original SCSI Manager functions and TIB instructions, except for scComp (compare).

In terms of maximum data transfer (bytes-per-second) over the internal SCSI bus, SCSI Manager 4.3 performs similarly to the original SCSI Manager. This aspect of performance is limited by the capability of the SCSI controller hardware and can be improved by adding a faster HBA.

In terms of overall system performance, the asynchronous capability of SCSI Manager 4.3 can provide significant benefits by allowing application code to regain control of the system while a SCSI transaction is in progress. This concurrency is a key benefit of asynchronous operation. In addition, support for disconnect/reconnect allows applications to initiate multiple I/O requests on multiple targets simultaneously, allowing further increases in throughput.

Multiple bus systems offer the added benefit of concurrency between buses. If DMA is used for both buses, their data transfer periods can be overlapped as well.

All the functions provided by the original SCSI Manager are emulated by the SCSI Manager 4.3 XPT and SIM for the internal SCSI bus. This level of compatibility is optional for third-party SIM/HBA developers. When a SIM registers its HBA with the SCSI Manager 4.3 XPT, the SIM specifies whether or not it is able to emulate the original SCSI Manager functions by setting the oldCallCapable field of the SIM initialization record.

When an application or device driver calls the original SCSI Manager function SCSIGet, the XPT sets a flag preventing any additional SCSIGet function calls but performs no other action. Upon receipt of a SCSISelect function call, the XPT issues a SCSIOldCall request to the appropriate SIM, which places the request in its queue.

Once the SCSIOldCall request begins execution, the SIM emulates subsequent original SCSI Manager function calls passed to it by the XPT. During this emulation, no new requests are processed until the entire transaction is completed and the SCSIComplete function returns. Any SCSIGet or SCSISelect requests received after the start of a SCSIOldCall request are rejected and return the scMgrBusyErr code.

While the original SCSI Manager emulation is in progress, asynchronous requests made by other applications or device drivers (using SCSI Manager 4.3 functions) are queued but do not execute until the emulation is complete. Requests to other SIMs are not affected and continue to execute normally.

The SCSIReset function resets only those buses that are capable of handling original SCSI Manager functions. The SCSIStat function returns results as accurate as possible for the SIM/HBA handling the request.

The scComp (compare) TIB instruction is not supported by SCSI Manager 4.3 because DMA transfers do not permit this type of compare operation. This should pose few compatibility problems because this instruction is rarely used. You can, of course, write your own code to compare data on a SCSI device with data in memory.

See Also