Delivery Service Facilities

The SCB architecture defines two forms of control block delivery, known as locate mode and move mode. As the IBM SCSI adapters use locate mode delivery only this mode will be described. The following section provide an overview of the services, functions and protocols defined for locate mode and a brief description of their underlying control structures.

Locate Mode

Locate mode is generally used for traditional I/O protocols where there is a single system unit that requests a feature adapter to perform work on its behalf. The format of the control structure in locate mode is relatively fixed. The structure allows various command, status, and indirect list control blocks, connected with pointers, to represent a request from a client to a server. Figure "Overview of Delivery Support" shows an overview of the control block and data delivery support.

The delivery support delivers one request at a time. A control block request is initiated by the client, which passes the physical address of the control block to the server through a command register (port) in I/O. The I/O space ports are described in I/O Port Definitions.

Locate mode provides:

  • Requests to Devices

    To use a device, a client sends requests in the form of control blocks to the device ID that represents the device and receives replies from it for each such request.

  • Support for Multiple Devices per Adapter

    Adapters may provide support for multiple devices. For example, multiple I/O devices may be connected to a single SCSI adapter. The delivery support enables the delivery of requests to specific devices through the use of unique device identification numbers.

  • Adapter Management

    To be able to manage the adapter and deliver device/resource control information to it, the adapter's unit manager is assigned device ID 0. It receives all adapter unit management information.

  • Command and Data Chaining and Detailed Status

    The control structure defined for locate mode provides for:

    Command blocks may point to data directly or via an indirect address list. Figure "Locate Mode Control Block Delivery Structure" shows a sample request control structure consisting of two command control blocks (command chaining). The first control block uses an indirect list control block to reference multiple buffers (data chaining). The second control block has a direct pointer to a single buffer. The pointer to the first control block is communicated via the shared I/O address space.  

    There are three different control block structures used by locate mode requests:

  • Command Control Blocks

    The base command control block is a variable length structure created and maintained in shared memory by the client in the system unit. It is used to convey requests to a subsystem or device in an adapter. These requests are used to direct the operation of the subsystem or device. In Figure "SCB Structure Used by the IBM SCSI Adapter" we show the structure of the command control block as used by the IBM SCSI adapters.

    The command word specifies the operation to be executed, for example read or write. The enable word controls optional features to be used during the operation, for example whether the system buffer address points to actual data or is an indirect reference.

    The OS/2 V2.0 disk device driver builds the SCB and other control blocks required. It then calls the ABIOS transfer SCB function to initiate the operation. ABIOS uses the adapter's I/O ports to pass the SCB address. The adapter then uses its DMA controller to read the SCB into private memory on the adapter where it decodes it and initiates the required operation. Data is read from or written to system memory using the adapters DMA controller.

    The IBM SCSI adapters support chaining of SCBs. The adapter then uses the chain address to find the next SCB in a chain. All SCBs in a chain must be for the same device. SCBs are executed in the order that they are chained in. The device driver will try to sort the SCBs into an order that will minimize head movement unless requested not to. Where the order of execution is critical (for example, paging might require that certain writes be done before reads) this optimization will be disabled.

    A single IBM SCSI adapter can overlap processing of one command for up to 15 attached devices.

  • Indirect Address Lists

    An indirect address list is a variable length list containing address-count pairs, and is used to support data chaining. The location of the indirect list control block and its length are specified by the System Buffer Address and System Buffer Byte Count fields in the command control block.

    Each entry in the list is 8 bytes (4 byte address and 4 byte length).

    The IBM SCSI adapters use the indirect address list structure for specifying scatter/gather lists. The layout of a scatter/gather list is shown in Figure "IBM SCSI Adapter Scatter/Gather List". When passing a memory address to an adapter, the actual physical address at which the data is located must be used. Because of the mapping of virtual memory to pages in the physical address space, a data buffer could be split across multiple discontiguous pages. This means that a single logical disk I/O operation could require several physical operations. The scatter/gather list allows one I/O operations to access data in more than one physical memory location. Each entry in the list specifies a physical memory address and a data length.

    During a write to disk, data is then gathered from different memory locations and written to a contiguous block on disk. During a read from disk, data can be scattered to different locations in system memory. The IBM SCSI adapters support scatter/gather lists with up to 16 entries.

    When coupled with the ability to chain SCBs together, scatter/gather lists form an efficient mechanism for communicating paging I/O operations. By being able to chain SCBs together, both reads and writes can be specified in a single call from the paging subsystem to the file system. Scatter/gather lists allow multiple page reads or writes for a single SCB.

  • Termination Status Control Blocks

    In addition to the status indication in the ISP (Interrupt Status Port), the SCB architecture allows status information to be reported for each command. This information can be reported in a termination status block, which is connected to each command control block. The adapter writes request completion status or termination status into this control block. The layout of the termination status block used by the IBM SCSI adapters is shown in Figure "IBM SCSI Adapter Termination Status Block".


    [Back: Delivery Service Structure]
    [Next: Additional Information]