SCSI Parallel Interface


This section explores the details of SPI operation. Though the SPI is waning in popularity, there is still a significant amount of SPI-connected storage in production environments today.

SPI Media, Connectors, Transceivers, and Operating Ranges

The SPI supports only copper media, but various copper media and connectors can be used depending on the SPI version. Media and connectors are specified as shielded or unshielded. Shielded components are used for external connections between enclosures, and unshielded components are used for connections inside an enclosure. Table 5-1 summarizes the supported configurations for each SPI version.

Table 5-1. SPI Media and Connectors

Version

Media

Connectors

SPI-2

Unshielded flat ribbon cable

Unshielded flat twisted-pair ribbon cable

Unshielded round twisted-pair cable

Shielded round twisted-pair cable

Printed Circuit Board (PCB) backplane

50-pin unshielded

68-pin unshielded

80-pin unshielded

50-pin shielded

68-pin shielded

SPI-3

Unshielded planar cable

Unshielded round twisted-pair cable

Shielded round twisted-pair cable

PCB backplane

50-pin unshielded

68-pin unshielded

80-pin unshielded

50-pin shielded

68-pin shielded

SPI-4

Unshielded planar bulk cable

Unshielded round twisted-pair bulk cable

Shielded round twisted-pair bulk cable

PCB backplane

50-pin unshielded

68-pin unshielded

80-pin unshielded

50-pin shielded

68-pin shielded

SPI-5

Unshielded planar bulk cable

Unshielded round twisted-pair bulk cable

Shielded round twisted-pair bulk cable

PCB backplane

50-pin unshielded

68-pin unshielded

80-pin unshielded

50-pin shielded

68-pin shielded


As discussed in chapter 3, "Overview of Network Operating Principles," the SPI uses four transceiver types known as single-ended (SE), multimode single-ended (MSE), low voltage differential (LVD), and high voltage differential (HVD). The SPI operating range is determined by the transceiver type, the medium, the number of attached devices, and the data rate. Table 5-2 summarizes the operating range (expressed in meters) supported by each SPI version.

Table 5-2. SPI Operating Ranges

Version

Operating Range (m)

SPI-2

1.525

SPI-3

1.525

SPI-4

1.525

SPI-5

225


SPI Encoding and Signaling

As explained in chapter 3, "Overview of Network Operating Principles," many networking technologies encode data bits received from OSI Layer 2 into a different bit set before transmission at OSI Layer 1. However, the SPI does not. Instead, the SPI implements a complex system of electrical signaling at OSI Layer 1 to provide similar functionality. The SPI implements multiple electrical signaling schemes depending on the transceiver type, data transfer mode, and data rate. Additionally, the SPI electrical signaling schemes provide much of the OSI Layer 2 functionality that is normally provided via control frames and header fields. Several different electrical signals are raised and lowered in concert to maintain clock synchronization, negotiate bus phases, establish peer sessions, control the flow of data, recover from bus errors, and so on. This approach reflects the parallel nature of the SPI. Because this approach is quite different from the methods employed by serial networking technologies, in-depth discussion of the SPI signaling rules is not germane to the understanding of modern storage networks. Readers who are interested in these details are encouraged to consult the latest version of the ANSI T10 SPI specification.

SPI Addressing Scheme

The SPI does not implement any equivalent to SAM device or port names. However, the SPI does implement an equivalent to SAM port identifiers. These are known simply as SCSI Identifiers (SCSI IDs). SPI devices use SCSI IDs when transmitting frames to indicate the intended destination device. On an 8-bit wide data bus, up to eight SCSI IDs are supported ranging from 0 to 7. On a 16-bit wide data bus, up to 16 SCSI IDs are supported ranging from 0 to 15.

SPI Name Assignment and Resolution

The SPI does not implement SAM names, so name assignment and resolution mechanisms are not required.

SPI Address Assignment and Resolution

The SCSI ID of each device must be manually configured. An SPI device typically has a jumper block, toggle-switch block, or other physical selector that is used to configure the SCSI ID. Some storage controllers support software-based SCSI ID configuration via a setup program embedded in the controller's BIOS. A protocol called SCSI configured automatically (SCAM) was defined in SPI-2 for automatic SCSI ID assignment on SPI buses. SCAM promised to bring plug-and-play functionality to the SPI. However, SPI-3 made SCAM obsolete, thus preserving the static nature of SCSI IDs. The SPI implements only OSI Layer 2 addresses, so address resolution is not required.

SPI Media Access

Because all SPI attached devices use a common set of pins for transmission and reception, only one device can transmit at any point in time. Media access is facilitated through an arbitration process. Each device is assigned an arbitration priority based on its SCSI ID. The highest priority is 1, which is always assigned to SCSI ID 7. Typically, only one initiator is attached to an SPI bus, and it is assigned SCSI ID 7 by convention. This convention ensures the initiator is able to take control of the bus at any time. For historical reasons, the remaining priority assignments are not as straightforward as one might expect. Table 5-3 lists the SPI priorities and associated SCSI IDs.

Table 5-3. SPI Priorities and SCSI IDs

Priority

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

SCSI ID

7

6

5

4

3

2

1

0

15

14

13

12

11

10

9

8


Note

It is possible for multiple initiators to be connected to a single SPI bus. Such a configuration is used for clustering solutions, in which multiple hosts need simultaneous access to a common set of LUNs. However, most SPI bus deployments are single initiator configurations.


There are two methods of arbitration; normal arbitration, and quick arbitration and selection (QAS). Normal arbitration must be supported by every device, but QAS support is optional. QAS can be negotiated between pairs of devices, thus allowing each device to use normal arbitration to communicate with some devices and QAS arbitration to communicate with other devices. This enables simultaneous support of QAS-enabled devices and non-QAS devices on a single SPI bus.

Using normal arbitration, priority determines which device gains access to the bus if more than one device simultaneously requests access. Each device that loses an arbitration attempt simply retries at the next arbitration interval. Each device continues retrying until no higher priority devices simultaneously arbitrate, at which point the lower priority device can transmit. This can result in starvation of low-priority devices. So, an optional fairness algorithm is supported to prevent starvation. When fairness is used, each device maintains a record of arbitration attempts. Higher priority devices are allowed to access the bus first, but are restrained from arbitrating again until lower priority devices that lost previous arbitration attempts are allowed to access the bus.

The intricacies of this arbitration model can be illustrated with an analogy. Suppose that a director of a corporation goes to the company's cafeteria for lunch and arrives at the cashier line at precisely the same time as a vice president. The director must allow the vice president to go ahead based on rank. Now suppose that the corporation's president arrives. The president must get in line behind the director despite the president's superior rank. Also, the director may not turn around to schmooze with the president (despite the director's innate desire to schmooze upwardly). Thus, the director cannot offer to let the president go ahead. However, the director can step out of line (for example, to swap a chocolate whole milk for a plain low-fat milk). If the director is out of line long enough for the cashier to service one or more patrons, the director must re-enter the line behind all other employees.

QAS is essentially normal arbitration with a streamlined method for detecting when the bus is available for a new arbitration attempt. Normal arbitration requires the SPI bus to transition into the BUS FREE phase before a new arbitration attempt can occur. QAS allows a QAS-enabled device to take control of the bus from another QAS-enabled device without changing to BUS FREE. To prevent starvation of non-QAS-enabled devices, the initiator can arbitrate via QAS and, upon winning, force a BUS FREE transition to occur. Normal arbitration must then be used by all devices for the ensuing arbitration cycle. In this respect, the convention of assigning the highest priority to the initiator allows the initiator to police the bus. The fairness algorithm is mandatory for all QAS-enabled devices when using QAS, but it is optional for QAS-enabled devices during normal arbitration.

SPI Network Boundaries

All SPI bus implementations are physically bounded. It is not possible to create an internetwork of SPI buses because no OSI Layer 2 bridging capability is defined. Therefore, the SPI does not support logical boundaries. Likewise, the concept of a virtual SPI bus is not defined in any specification. Note that it is possible to expand a single SPI bus via SCSI expanders that provide OSI Layer 1 repeater functionality. In fact, some SCSI enclosures employ an expander between each pair of drives to facilitate hot-pluggable operation. However, SPI expanders do not affect the operation of an SPI bus at OSI Layer 2. Therefore, an SPI bus is always a single physical segment bounded by its terminators.

SPI Frame Formats

The SPI implements various frame formats, each of which is used during a specific bus phase. Three frame formats are defined for the DATA phase: data, data group, and information unit. The frame format used depends on the data transfer mode. During asynchronous transfer, only the data format may be used. During synchronous transfers, the data, data group, and information unit formats may be used. During paced transfer, only the information unit format may be used.

During asynchronous transfer, only data is transmitted. There is no header or trailer. There is no formal frame format aside from stipulated bit and byte positions for data. A separate electrical signal is used to indicate odd parity for the data bits. By contrast, a data group frame has a data field, an optional pad field and a parallel CRC (pCRC) trailer field. Likewise, an information unit frame has a data field, an optional pad field, and an information unit CRC (iuCRC) trailer field. The difference between a data group and an information unit has less to do with frame format than with protocol behavior during data transfer.

SPI Delivery Mechanisms

The SPI represents a very simple network. So, delivery mechanisms are inherently simplified. The SPI implements the following delivery mechanisms:

  • It is not possible for frames to be dropped on an SPI bus by any device other than the receiver. This is because there are no intermediate processing devices. Electrical signals pass unmodified through each device attached to an SPI bus between the source and destination devices. If the receiver drops a frame for any reason, the sender must be notified.

  • When a device drives a signal on an SPI bus, the destination device reads the signal in real time. Thus, it is not possible for duplicate frames to arrive at a destination.

  • Corrupt data frames are detected via the parity signal or the CRC field. Corrupt frames are immediately dropped by the receiver, and the sender is notified.

  • The SPI supports acknowledgement as an inherent property of the SPI flow control mechanism.

  • Devices attached to an SPI bus are not required to retransmit dropped frames. Upon notification of frame drop, a sender may choose to retransmit the dropped frames or abort the delivery request. If the retransmission limit is reached or the delivery request is aborted, the ULP (SCSI) is notified.

  • The SPI supports flow control in different ways depending on the data transfer mode (asynchronous, synchronous, or paced). Flow control is negotiated between each initiator/target pair. In all cases, the flow-control mechanism is proactive.

  • The SPI does not provide guaranteed bandwidth. While a device is transmitting, the full bandwidth of the bus is available. However, the full bandwidth of the bus must be shared between all connected devices. So, each device has access to the bus less frequently as the number of connected devices increases. Thus, the effective bandwidth available to each device decreases as the number of connected devices increases. The fairness algorithm also plays a role. Without fairness, high-priority devices are allowed access to the bus more frequently than low-priority devices.

  • The SPI inherently guarantees consistent latency.

  • Fragmentation cannot occur on the SPI bus because all devices are always connected via a single network segment.

  • The SPI intrinsically supports in-order delivery. Because all devices are connected to a single physical medium, and because no device on an SPI bus buffers frames for other devices, it is impossible for frames to be delivered out of order.

SPI Link Aggregation

The SPI-2 specification supported link aggregation as a means of doubling the data bus width from 16 bits to 32 bits. Link aggregation can be tricky even with serial links, so it is impressive that the ANSI T10 subcommittee defined a means to aggregate parallel links. The limited distance and single-segment nature of the SPI simplified some aspects of the SPI link aggregation scheme, which made ANSI's job a bit easier. The SPI 32-bit data bus signals were spread across two parallel links to load-balance at the byte level. The parallel nature of the SPI made byte-level load balancing possible. The SPI 32-bit data bus was made obsolete by SPI-3. No subsequent SPI specification defines a new link-aggregation technique.

SPI Link Initialization

The SPI bus is itself a cable. Therefore, initialization of an SPI bus is actually initialization of the devices attached to the bus. Therefore, SPI bus initialization cannot begin until one or more devices power on. The bus phase is BUS FREE after devices power on until an initiator begins target discovery. As described in chapter 3, "Overview of Network Operating Principles," target discovery is accomplished via the TEST UNIT READY and INQUIRY commands. Upon completing its internal power-on self test (POST), a target device is capable of responding to the TEST UNIT READY and INQUIRY commands. Upon completing its internal POST, a initiator device is capable of issuing the TEST UNIT READY and INQUIRY commands. To initiate these commands, the initiator must arbitrate for access to the bus. During initial arbitration, only the initiator attempts bus access. Upon winning arbitration, target discovery ensues as described in chapter 3, "Overview of Network Operating Principles." After target discovery completes, normal bus communication ensues.




Storage Networking Protocol Fundamentals
Storage Networking Protocol Fundamentals (Vol 2)
ISBN: 1587051605
EAN: 2147483647
Year: 2007
Pages: 196
Authors: James Long

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net