HK1193884B - Facilitating transport mode input/output operations between a channel subsystem and input/output devices - Google Patents
Facilitating transport mode input/output operations between a channel subsystem and input/output devices Download PDFInfo
- Publication number
- HK1193884B HK1193884B HK14107102.4A HK14107102A HK1193884B HK 1193884 B HK1193884 B HK 1193884B HK 14107102 A HK14107102 A HK 14107102A HK 1193884 B HK1193884 B HK 1193884B
- Authority
- HK
- Hong Kong
- Prior art keywords
- data
- control unit
- value
- dcw
- command
- Prior art date
Links
Description
Technical Field
The present invention relates generally to input/output (I/O) processing. More particularly, the present invention relates to providing features that facilitate transport mode I/O operations.
Background
Input/output (I/O) is used to transfer data between memory and I/O devices of an I/O processing system. In particular, by performing I/O operations, data is written from memory to one or more I/O devices and data is read from one or more I/O devices to memory.
To facilitate the processing of I/O operations, an I/O subsystem of an I/O processing system is employed. The I/O subsystem is coupled to main memory and to I/O devices of the I/O processing system and directs the flow of information between the memory and the I/O devices. One example of an I/O subsystem is a channel subsystem. The channel subsystem uses the channel path as a communication medium. Each channel path includes a channel connected to a control unit, which is further connected to one or more I/O devices.
The channel subsystem and the I/O device may perform operations in a transfer mode that supports transferring one or more command control blocks to transfer data between the I/O device and the memory. A Transport Control Word (TCW) specifies one or more I/O commands to be executed. For commands that initiate a particular I/O operation, the TCW specifies the region of storage associated with the operation, the operations to be performed after completing the transfer with that region, and other options.
Disclosure of Invention
One embodiment includes a computer program product for performing an input/output (I/O) operation initiated by an I/O operation instruction on a host computer system configured to communicate with a control unit, the control unit in communication with one or more devices. The computer program product includes a tangible storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising: generating, by a channel subsystem of the host computer system, at least one command message specifying an I/O operation, the at least one command message includes one or more Device Command Words (DCWs), each DCW associated with an I/O command, wherein at least one DCW of the one or more DCWs comprises a data count and a suppress-length indication (SLI), the SLI is configured to indicate whether the control unit continues to perform the I/O operation in response to the control unit detecting an incorrect length condition, the incorrect length condition is detected in response to the data count not matching an amount of data required to execute the I/O operation command, wherein the required data is one of data available on the control unit for a read operation command and data required by the control unit for a write operation command; forwarding the at least one command message to the control unit; receiving an Incorrect Length (IL) value from the control unit, the IL value being a first IL value in response to the SLI being a first SLI value and the data count not matching the required amount of data, the IL value being a second IL value in response to the SLI being a second SLI value and the data count not matching the required amount of data; and in response to receiving the IL value from the control unit, storing an IL indicator in a subchannel status word, the IL indicator representing the IL value.
Another embodiment includes an apparatus for performing an input/output (I/O) operation initiated by an I/O operation instruction on a host computer system configured to communicate with a control unit, the control unit in communication with one or more devices. The host computer system is configured to perform: generating, by a channel subsystem of the host computer system, at least one command message specifying an I/O operation, the at least one command message includes one or more Device Command Words (DCWs), each DCW associated with an I/O command, wherein at least one DCW of the one or more DCWs comprises a data count and a suppress-length indication (SLI), the SLI is configured to indicate whether the control unit continues to perform the I/O operation in response to the control unit detecting an incorrect length condition, the incorrect length condition is detected in response to the data count not matching an amount of data required to execute the I/O operation command, wherein the required data is one of data available on the control unit for a read operation command and data required by the control unit for a write operation command; forwarding the at least one command message to the control unit; receiving an Incorrect Length (IL) value from the control unit, the IL value being a first IL value in response to the SLI being a first SLI value and the data count not matching the required amount of data, the IL value being a second IL value in response to the SLI being a second SLI value and the data count not matching the required amount of data; and in response to receiving the IL value from the control unit, storing an IL indicator in a subchannel status word, the IL indicator representing the IL value.
Another embodiment includes a method for performing an input/output (I/O) operation initiated by an I/O operation instruction on a host computer system configured to communicate with a control unit, the control unit in communication with one or more devices. The method comprises the following steps: generating, by a channel subsystem of the host computer system, at least one command message specifying an I/O operation, the at least one command message includes one or more Device Command Words (DCWs), each DCW associated with an I/O command, wherein at least one DCW of the one or more DCWs comprises a data count and a suppress-length indication (SLI), the SLI is configured to indicate whether the control unit continues to perform the I/O operation in response to the control unit detecting an incorrect length condition, the incorrect length condition is detected in response to the data count not matching an amount of data required to execute the I/O operation command, wherein the required data is one of data available on the control unit for a read operation command and data required by the control unit for a write operation command; forwarding the at least one command message to the control unit; receiving an Incorrect Length (IL) value from the control unit, the IL value being a first IL value in response to the SLI being a first SLI value and the data count not matching the required amount of data, the IL value being a second IL value in response to the SLI being a second SLI value and the data count not matching the required amount of data; and in response to receiving the IL value from the control unit, storing an IL indicator in a subchannel status word, the IL indicator representing the IL value.
Other features and advantages may be realized, or obtained, by the techniques of this embodiment. Other embodiments and aspects are described herein and are considered a part of the claimed invention. For a better understanding of the invention with advantages and features, refer now to the description and to the drawings.
Drawings
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The above and other objects, features and advantages of the present invention will become apparent from the following detailed description when read in conjunction with the accompanying drawings, in which:
FIG. 1 depicts one embodiment of an I/O processing system to integrate and use one or more aspects of the present invention;
FIG. 2 illustrates one embodiment of a Transport Control Word (TCW);
FIG. 3 illustrates one embodiment of a Transport Command Control Block (TCCB);
FIG. 4 illustrates one embodiment of a transport command Information Unit (IU) including the TCCB of FIG. 3;
FIG. 5 illustrates one embodiment of a transport command header of the transport command IU of FIG. 4;
FIG. 6 illustrates one embodiment of a Transport Command Area Header (TCAH) of the TCCB of FIG. 4;
FIG. 7 illustrates one embodiment of a Transport Command Area (TCA) of the TCCB of FIG. 4;
FIG. 8 is a table illustrating an exemplary determination of various data counts for a unidirectional data transfer operation;
FIG. 9 is a table illustrating an exemplary determination of various data counts for a bi-directional data transfer operation;
FIG. 10 illustrates one embodiment of a Device Command Word (DCW);
FIG. 11 illustrates one embodiment of the control flags field of the DCW in FIG. 10;
FIG. 12 illustrates exemplary command codes and flags for a DCW;
FIG. 13 illustrates one embodiment of a transport command area extension (TCAX);
FIG. 14 illustrates one embodiment of a CBC offset block;
FIG. 15 is a flow diagram illustrating an embodiment of a method for performing a transport mode I/O operation;
FIG. 16 illustrates an embodiment of a transport data IU for transporting input and output data between a channel and a control unit and/or I/O device;
FIG. 17 shows an n embodiment of an Interrupt Response Block (IRB) including a subchannel status word (SCSW);
FIGS. 18A and 18B illustrate exemplary state qualifiers for the SCSW of FIG. 17;
fig. 19 shows an embodiment of a transport response IU; and
fig. 20 illustrates one embodiment of status areas of the transport response IU of fig. 19.
Detailed Description
Embodiments of the invention facilitate input/output (I/O) processing in a computer system. In one embodiment, a transfer command is provided to manage I/O operations and transfer data over a channel path. The transfer command Transfers Command Meta Information (TCMI) for managing data transfer checks and other DCW transfers. The TCMI may be specified by a Transport Control Word (TCW) defined in one or more data transport Information Units (IU) that define, specify, and verify information about data to be transferred in I/O operations. The transport commands may include an interrogate command, a Transport CBC Offset Block (TCOB) command, and a Transport TCA Extended (TTE) command.
In one embodiment, I/O processing is facilitated by having a host computer increase the number of commands that can be sent to a device to perform I/O operations. For example, a TCMI in the form of a transport command area extension (TCAX) may be sent from a host to a device to increase the number of commands that can be associated with I/O operations. In one embodiment, TCAX may be specified by a TCW and sent via a Device Command Word (DCW), referred to as a Transport TCA Extension (TTE) DCW, that includes commands that need to be executed in addition to commands sent in the Transport Command Area (TCA). In one embodiment, TCAX is specified by TTEDCW and sent as output data to the control unit.
I/O processing may also be facilitated by providing a means by which an I/O device may continue I/O operations when an incorrect length record is encountered. For example, DCW incorrect length and FCX incorrect length indication functions may be installed in the host system and the control unit or device. This function provides an Incorrect Length (IL) check that can be performed by the control unit. A suppress incorrect length or a Suppress Length Indication (SLI) field may be added in the DCW sent to the device. When this bit is activated, the DCW chain is allowed to continue when the control unit detects an incorrect length condition.
I/O processing may also be facilitated by providing a means for simultaneously sending read and write commands to a device through a single I/O operation. The prior art TCW channel program specifies all write commands or all read commands. Bidirectional operation may be specified by setting one or more flags in a Transport Command Header (TCH) of the command IU, for example, by setting read and write flags to 1 and providing read and write data counts simultaneously. Further, a flag in an initiation or login message, such as a process login (PRLI) request message, may be set to indicate that the channel subsystem supports bi-directional data transfer. The response message, such as a PRLI accept message, may include a flag that may be set to indicate whether the device supports two-way data transfer. If both the host and the control unit support bi-directional data transfer, but the read and write flags are set in the command IU, the device will not report an error. This functionality is an improvement over prior art fibre channel protocols that do not support bi-directional data transfer operations. As described herein, a "bidirectional data transfer" is a transfer of input and output data performed simultaneously within a single TCWI/O operation, e.g., read and write commands are sent and executed simultaneously within a single TCWI/O operation.
FIG. 1 illustrates an exemplary embodiment of an I/O processing system 100 including a host computer system 102 comprising a data storage device and/or a processing system, such as International Business machines corporation () Pushed outA mainframe computer. IBM is a registered trademark of International Business machines corporation, Armonk, N.Y.. Other names used herein may be registered trademarks, trademarks or product names of International Business machines corporation or other companies. Host computer system 102 includes various processing, storage, and communication elements. In one embodiment, host computer system 102 includes one or more Central Processing Units (CPUs) 104, memory such as main storage or memory 106, expansion storage or memory 108, one or more Operating Systems (OSs) 110 executed by one or more CPUs 104. For example, one CPU104 may executeOperating system 110 and/orOperating system 110 acts as a distinct virtual machine instance. CPU104 is the control hub for I/O processing system 100. It contains serialization and processing functions for instruction execution, interrupt handling, timing functions, initial program loading, and other machine-related functions. The CPU104 is connected to the main memory 106 and/or expansion memory 108 through a connection 113, such as a bi-directional or unidirectional bus.
Host computer system 102 also includes a channel subsystem 114 that provides a communications interface between the host system 101 and various I/O devices 116, which may be controlled by one or more control units 118. I/O devices include devices such as printers, tape units, direct access storage devices, displays, keyboards, communication controllers, remote processing devices, and sensor-based devices. In the description herein, the terms "control unit" and "device" may be used interchangeably, or a control unit may be considered to include one or more devices. Channel subsystem 114 directs the flow of information between I/O devices 116 and host computer system 102. It frees the CPU104 from tasks that communicate directly with the I/O device 116 and allows data processing to proceed in parallel with I/O processing. Channel subsystem 114 is connected to CPU104, main memory 106, and/or expansion memory 108 through a connection 120, such as a bus.
In one embodiment, channel subsystem 114 is connected to each I/O device 116 through a respective "channel path" 122 that connects channel subsystem 114 to each control unit 118 through a connection 124, such as a serial or parallel link. The control unit 118 may be connected to the communication subsystem 114 through more than one channel path 122, and the I/O device 116 may be connected to more than one control unit 118 and/or I/O device 116. In general, individual I/O devices 116 may be accessed simultaneously by multiple channel paths. The channel paths may use various types of connections, such as parallel interfaces, serial I/O interfaces, and FICONI/O interfaces. For example, the serial channel path may comprise one or more optical fibers connected to the control unit 118 by, for example, a dynamic switch 126 in a Fibre channel fiber, and the parallel interface may comprise a plurality of electrical conductors or fiber optic conductors.
In one embodiment, channel subsystem 114 includes one or more individual channels 128 that are connected to one or more control units 118 and/or I/O devices 116 via one or more channel paths 122, respectively. Each channel 128 includes processing electronics, such as a local channel microprocessor 130 and a local channel memory 132 connected to the local channel microprocessor 130 and accessible by the local channel microprocessor 130. The local channel memory 132 may include information such as channel program designations, channel path identifiers, device numbers, device counts, status indications, and information regarding path availability and functions to be or being performed.
Each channel 128 additionally includes one or more sub-channels therein. Each subchannel is a data structure located within channel memory 132 that provides information about the associated I/O device 116 and its connection to the channel subsystem 114. The subchannel also provides information regarding I/O operations and other functions involving the associated I/O device 116. A subchannel is a device by which channel subsystem 114 provides information to CPU104 about an associated I/O device 116. In one or more embodiments, the number of subchannels provided by the channel subsystem is independent of the number of channel paths 122 for the associated I/O device 116. For example, a device 116 that is accessible through an alternate channel path 122 is still represented by a single sub-channel.
Each control unit 118 provides logic to operate and control one or more I/O devices 116, and uses general functionality to adapt the characteristics of each I/O device 116 to the link interface provided by the channel 128. These general functions provide for the execution of I/O operations, indications of the status of the I/O devices 116 and control units 118, control of the timing of data transfers on the channel paths 122, and a particular level of I/O device control. The control unit 118 may be packaged separately or may be physically and logically integrated with an I/O device, channel subsystem, or CPU.
One or more of I/O processing systems 100The above-mentioned components are further described in "z/ArchitecturePrinciplesofOperation(z/Architecture operating principle, publication No. SA22-7832-08, 8 months 2010, 9 th edition).
I/O operations are described as any operations involving the transfer of data between a host computer system and an I/O device 116. As described herein, I/O operations include communications between the channel subsystem 114 and the devices 116 (through the control unit 118, in one embodiment), where a single command (e.g., a channel command word or CCW), a single command message including multiple commands (e.g., a transport command information unit or Transport Command Control Block (TCCB)), or a multi-chain command (e.g., multiple CCWs) is sent from the channel subsystem 114 to the devices. The I/O operations may also include one or more response messages generated by the device 166 or an associated control unit 118 in response to receiving and/or executing the command or chain command.
In one embodiment, the I/O operation is initiated by the device 116 by executing I/O instructions generated by the OS110 that specify the subchannel associated with the device 116. Such instructions are executed by the CPU104 in the host system by the CPU104 sending parameters to the channel 128 or sub-channel to request the channel subsystem 114 to perform various functions in the I/O operation.
For example, CPU104 executes a "START SUBCHANNEL" instruction by sending parameters to the target subchannel requesting that channel subsystem 114 perform a boot function via I/O device 116 associated with the subchannel. Channel subsystem 114 performs boot functions by using information on the subchannel, including information conveyed in the execution of the STARTSUBCHANNEL instruction, to find a channel path accessible to device 116, and performing I/O operations after the selected channel path.
When an instruction, such as STARTSUBCHANNEL, is executed by the CPU104, the channel 128 begins performing I/O operations. In one embodiment, channel subsystem 114 performs operations in accordance with a High Performance FICON (HPF) protocol for communication between channel subsystem 114 and devices 116 and/or control unit 118. FICON and HPF are further described in "fibre channel: Single-byte Command codeSetsMappingProtocol-4 (FC-SB-4), T11Project2122-D, 2009, 9, 22 days, revision 3.00".
In one embodiment, execution of the STARTSUBCHANNEL instruction passes the contents of an Operation Request Block (ORB) to channel subsystem 114. The ORB specifies a channel program that includes an address of one or more command words (e.g., a channel command word or transport command word described further below). There are two subchannel modes of operation. In one embodiment, host computer system 102 performs operations in command mode and specifies a command word in the form of a Channel Command Word (CCW). In another embodiment, the host system performs operations in a transport mode and specifies a command word in the form of a Transport Command Word (TCW).
A subchannel may enter a transport mode when an FCX (fibre channel expansion) function is installed and the start function is set on the subchannel as a result of executing a STARTSUBCHANNE instruction that specifies a TCW channel program. The subchannel remains in the transmission mode until the start-up function is reset on the subchannel, which is in the command mode at all other times.
In command mode, the channel executes a CCW channel program that includes a single channel command word or a series of channel command words that are executed in sequence that control a particular sequence of channel operations. The control unit decodes, accepts and executes the CCW commands via the I/O devices to perform the CCWI/O operations. One or more CCWs configured for sequential execution form a CCW channel program and execute as one or more I/O operations, respectively.
The fibre channel expansion (FCX) function is an optional function that provides information for a transport mode channel program that is made up of Transport Control Words (TCWs) that specify Transport Command Control Blocks (TCCBs) and Transport Status Blocks (TSBs). The TCCB includes a Transport Command Area (TCA) containing a list of one or more (e.g., up to 30) I/O commands in the form of Device Command Words (DCWs). The TCW and its TCCB may specify a read or write operation. In one embodiment, the FCX bidirectional data transfer function may be installed in a system that supports transfer mode operation, which allows the host computer system 102 to simultaneously transfer input and output data via a single transfer mode I/O operation in the case where the connection device 116 and the control unit 118 support bidirectional data transfer. When the control unit 118 recognizes bidirectional data transfers, the TCW and its TCCB may specify both read and write data transfers according to the device.
In the transport mode, a single Transport Command Word (TCW) specifies the location in the TCCB memory (and the location in the memory 106 or 108 of the one or more data regions) that is sent in a single message (rather than individual CCWs in the command mode). The control unit 118 performs a transport mode I/O operation by decoding, accepting, and executing the TCCB and the respective DCWs included therein. If the ORB specifies a TCW channel program, the channel subsystem 114 uses the information in the specified TCW to transfer the TCCB to the control unit 118. After the TCCB is transferred to the control unit 118, the contents of the TCCB are ignored by the channel subsystem 114 and are only meaningful to the control unit 118 and its associated I/O devices 116.
In an exemplary embodiment, the control unit 118 generates the response message in response to executing the channel program. In some instances, the control unit 118 may also generate the response message directly without executing the channel program, e.g., to notify the channel subsystem 114 that the channel program will not execute. Control unit 118 may include a number of elements to support communication between I/O communications adapters and I/O devices, as well as to support channel program execution. For example, control unit 118 may include control logic to analyze and process messages, in addition to one or more queues, timers, and registers, to facilitate communication and status monitoring.
FIG. 2 illustrates an embodiment of a Transfer Control Word (TCW) 140 that is stored in a host system (e.g., host memory 106) and specifies at least one control block to be transferred from the channel 128 to the control unit 118. In one embodiment, the control block is a Transfer Command Control Block (TCCB), the contents of which are to be transferred to the control unit 118 and the I/O device 116 for processing. When the TCW140 specifies a TCCB, the TCCB includes a TCA that specifies one or more Device Command Words (DCWs) and their associated selections. For DCWs that specify commands to initiate data transfers (except for control data contained within the TCCB), the TCW140 specifies one or more storage regions in which data is contained.
In one embodiment, the TCA includes a Transport TCA Extension (TTE) command provided to transport other DCWs and/or control data than may be contained within the TCCB. The TTE transmits a TCA extension (TCAX) to the control unit (including at least one DCW) and is treated as a logical extension of the TCA associated therewith (e.g., by linking the last DCW of the TCCB to the first DCW of the TTE).
Referring now again to FIG. 2, an embodiment of the TCW140 is a 64 byte control block specified on a 64 byte boundary. The TCW includes a number of fields as described below.
For example, the plurality of flag fields 142 indicate whether direct or indirect data addressing is being used to look up input data, output data, or TCCB. The output Transfer Indirect Data Addressing (TIDA) field indicates whether the output data is addressed directly or indirectly. For example, when word 0, bit 7 of TCW140 is 0 and specifies output data, output data address field 144 specifies the output data location in absolute storage. When bit 7 is 1, the output data address field 144 specifies the absolute address of the first TIDAW in the TIDA word (TIDAW) or TIDAW list (TIDAL), which specifies one or more output storage locations, respectively. The input TIDA field indicates whether the input data is addressed directly or indirectly. For example, when word 0, bit 5 is 0 and specifies input data, the input data address field 146 specifies the absolute address of the input storage location (i.e., the location where the input data is stored). When bit 5 is 1, the input data address field 146 specifies the absolute address of the first TIDAW in TIDAW or TIDAL, which specifies one or more input storage locations. The transport command control block TIDA (TCCB-TIDA) field indicates whether the TCCB is addressed directly or indirectly. For example, when word 0, bit 6 is 0, the TCCB address field 148 specifies the TCCB absolute address of the TCW, and when bit 6 is 1, the TCCB address field 148 specifies the absolute address of the TIDAW or TIDAL, which specifies one or more TCCB locations.
The TCW140 also includes a Transport Command Control Block Length (TCCBL) field 150 that specifies the length in bytes of the TCCB. For example, the TCCBL field includes an unsigned integer whose value (e.g., when added to 20 for unidirectional data transfer or 24 for bidirectional data transfer) specifies the length of the TCCB in bytes.
The read operation (R) field 152 is non-zero (e.g., bit 14 of word 1 is 1) when indicating the number of bytes to transfer into the main memory 106. When the number of bytes to be transferred into main memory is indicated, the write operation (W) field 154 is non-zero (e.g., bit 15 of word 1 is 1). If both the R field 152 and the W field 154 are 1, a program check condition will be recognized unless the target device 116 and the control unit 118 support two-way data transfer. If the W bit is 1 and the TCW is the query TCW, the program check condition will be identified.
The output data address field 144 indicates the location in storage of any output data to be sent to the device. For example, words 2-3 specify a 64-bit output position in absolute storage when bit 15 of word 1 (W field bit 154) is a1 and bit 7 of flag field 142 (output TIDA flag) is a 0. When the W bit is 1 and the output TIDA flag is 1, words 2-3 specify the 64-bit position of the TIDAW or TIDAW list in absolute storage, which specifies one or more output storage locations. The input data address field 146 indicates a location where any input data is stored when received from the device. For example, words 4-5 specify a 64-bit input position in absolute storage when bit 14 of word 1 (R field bit 152) is a1 and bit 5 of flag field 142 (input TIDA flag) is a 0. When the R bit is 1 and the input TIDA flag is 1, words 4-5 specify the position of the TIDAW or TIDAW list in absolute storage, which specifies the input storage location.
The transport status block address 156 specifies the address in storage of the transport status block of the TCW. For example, words 6-7 specify the 64-bit position of the transport status block of the TCW in absolute storage.
The transport command control block address field 148 specifies one or more TCCB (direct or indirect) addresses. For example, if the TCCB-TIDA bit (bit 6 of the flags field) is 0, words 8-9 specify the 64-bit position of the TCCB in absolute storage. When the TCCB-TIDA bit is 0, the TCCB is designated to reside in a contiguous area of storage. If the transfer command control block TIDA bit is 1, words 8-9 specify the 64-bit position of the TIDAW or TIDAW list in absolute storage, which specifies the position of the TCCB in absolute storage. When the TCCB-TIDA bit is 1, the TCCB may be designated to reside in a non-contiguous region of storage.
The output count field 158 specifies the number of output bytes of the TCW. For example, when bit 15 (W bit) of word 1 is 1, word 10 contains the unsigned integer total count of the output bytes of TCW. The input count field 160 specifies the number of input bytes of the TCW. For example, when bit 14 (R bit) of word 1 is 1, word 11 contains the unsigned integer total count of the input bytes of TCW.
If the TCW specifies a query operation, the query TCW address field 162 indicates the location in storage of the query TCW. For example, when the STARTSUBCHANNEL instruction specifies a TCW, word 15 of the TCW is not examined. However, when the CANCELSUBBCHANNEL instruction specifies a subchannel that is pending for start of the TCW channel program, but not pending for status, bits 1-31 of word 15 specified by STARTSUBCHANNEL specify the location in absolute storage of the query TCW used to initiate the query operation for the subchannel. If word 15 contains a 0 when CANCELSUBCHANNLE is issued, then no inquiry operation is initiated. Bit 0 of word 15 must be 0 when CANCELSUBCHANNNLE is issued, otherwise the program check condition is recognized and the query failure status is indicated. When CANCELSUBCHANNLE is issued and bits 1-31 of word 15 do not contain a 0, bits 1-31 of word 15 must specify a storage location on a 64 byte boundary, otherwise the program check condition is identified and the query failure status is indicated. Word 14 may be reserved to extend the query TCW address field to 64 bits.
Referring now to FIGS. 3 and 4, a Transport Command Control Block (TCCB) 170 includes one or more individual commands as part of a TCWI/O operation and is sent by the channel 128 to the control unit 118 and/or the device 116 via a channel path. TCCB170 relieves the channel from having to send multiple messages or units of information, and in addition passes the responsibility of performing the operation to the control unit and eliminates the need for control unit 118 to send a response for each command. Instead, the control unit 118 may execute all commands and will send a response when the operation is completed.
The TCCB170 is variable in length and may contain header and trailer information, as well as one or more commands (e.g., from 1 to 30) as Device Command Words (DCWs) that are logically linked (e.g., formed into a chain) so as to be sequentially executable by the control unit 118. The TCCB170 may exist as a single contiguous block of memory or as a plurality of non-contiguous blocks of memory. For example, the TCCBTIDA flag in TCW140 described above is used to specify whether a TCCB resides in contiguous storage.
Examples of TCCBs are shown in fig. 3 and 4. As shown in FIG. 4, the TCCB170 may be sent from the channel 128 to the control unit 118 as part of a transport command Information Unit (IU) 172 that is sent to the control unit 118 to initiate I/O operations. In one embodiment, the transport command IU172 consists of an 8-byte SB-4 header 174 followed by a 4-byte Transport Command Header (TCH) 176 and TCCB 170. The TCCB170 includes a 16 byte Transport Command Area Header (TCAH) 178, a variable length Transport Command Area (TCA) 180, and a Transport Command Area Trailer (TCAT) 182. TCAT182 may further include a 4-byte LRC field 184, a 4-byte data transfer length (DL) field 186, and for bi-directional operation, a 4-byte bi-directional read data transfer length (BRDL) field 188. These fields are described further below.
Referring now to FIG. 4, the SB-4 header 174 provides FC-4 addressing information to identify the logical path and device 116 to transfer data. The SB-4 header 174 provides information including the channel image ID and control unit ID for the logical path between the channel 128 and the control unit 118, as well as the device ID.
Referring now to fig. 5, TCH176 includes information regarding the operation of TCCB170 and its associated devices. In one embodiment, the TCH176 comprises 4 bytes and immediately follows the SB-4 header 174 in the transport command IU 172. The TCH176 includes fields such as a length field ("L1") 190, a read field ("R") 192, and a write field ("W") 194. The L1 field (located, for example, on bits 24-29) specifies the length (in words) of TCA180 plus a 1-word LRC field 184 immediately following TCA 180. For example, for a control unit 118 that does not support bi-directional operation, the total amount of data transferred in the transfer command IU172 is equal to the L1 field plus 8 (i.e., the L1 field plus 2 words SB-4 header, 1 word TCH, 4 words TCAH, and 1 word DL); otherwise, the control unit identifies a transport command IU integrity error caused by the data count error. For control units that support bi-directional operation, the total amount of data transferred in the transfer command IU172 is equal to the L1 field plus 8 (i.e., the L1 field plus 2 words SB-4 header, 1 word TCH, 4 words TCAH, and 1 word DL) or the L1 field plus 9 (i.e., the L1 field plus 2 words SB-4 header, 1 word TCH, 4 words TCAH, and 1 word DL, and 1 word BRDL for bi-directional operation); otherwise, the control unit will recognize a transport command IU integrity error caused by a data count error. If a transport command IU integrity error is not identified, the location of the LRV in the TCCB is looked up based on the L1 field and an LRC check may be performed.
The read (R) field 192 specifies that the TCA180 includes one or more read or input commands. In the embodiment of FIG. 5, the R field 192 is an R bit, bit 30, which when set to 1 indicates that the TCA180 contains one or more commands to transfer read data. When the R bit is set to 0, the TCA180 does not contain any command to transfer read data. When the R bit is a1 and the W bit (e.g., bit 31) is a 0, this operation is referred to as a read operation. When both the R bit and the W bit are set to 0, the TCA180 does not contain any command to transfer read or write data, indicating that the I/O operation is not to perform a data transfer. When both the R bit and the W bit are set to 1, the TCA180 can contain commands to transfer read and write data simultaneously, an operation referred to as bi-directional operation. If bi-directional operation is specified but the control unit 118 does not support bi-directional operation, or the control unit 118 supports bi-directional operation but the transport command IU172 contains the BRDL field 188, then the device 116 or the control unit 118 identifies TCH content errors caused by read-write collisions. When the R bit is 0 and control unit 118 or device 116 encounters a command in TCA180 that attempts to transmit read data, a TCCB content error caused by an invalid read attempt is identified.
The write (W) field 194 specifies that the TCA180 includes one or more write or output commands. In the embodiment of FIG. 5, the W field is a W bit, bit 31, which when set to 1 indicates that TCA180 contains one or more commands to transfer write data. When the bit is set to 0, TCA180 does not contain any command to transfer write data. When the W bit is a1 and the R bit (bit 30) is a 0, this operation is referred to as a write operation. When the W bit is 0 and the control unit 118 or the device 116 encounters a command in the TCA180 specifying a write command, a TCCB content error caused by an invalid write condition is identified.
Referring now to FIG. 6, an embodiment of a TCA header (TCAH) 178 includes information about TCA180 and the operations described therein, such as TCA length and equipment indication. In this embodiment, byte 3 of word 1 is an "L2" length field 196 containing unsigned binary integers specifying the length (in bytes) of TCA180 plus words 2 and 3 of the TCA header, followed immediately by the 4-byte LRC field 184 of TCA 180. The service opcode field 198 (e.g., bytes 0-1 of word 2) includes an unsigned integer value that specifies the type of operation specified by the TCCB. For example, a hexadecimal value of '1 FFE' indicates SB-4 device I/O operations, and a hexadecimal value of '1 FFF' indicates SB-4 device support functions. Priority number field 200 (e.g., byte 3 of word 2) includes the control unit I/O priority number.
Referring now to fig. 7, the Transport Command Area (TCA) 180 is a variable length area that contains one or more (e.g., from 1 to 30) commands as Device Command Words (DCWs) 202. In one embodiment, TCA180 is an integer having 4 byte words. For DCWs 202 that specify device control data, the TCA180 also contains control data associated with each DCW 202. Each DCW202 specifying control data reduces the maximum DCW capacity by one or more DCWs, depending on the size of the command association data. For a DCW202 specifying input or output data, the TCW140 specifies one or more associated memory regions, and the DCW specifies a byte count to transfer. In one embodiment, the maximum size of the TCA is 240 bytes. As shown in the embodiment of FIG. 7, when there is sufficient space in the TCA180 for the entire DCW202, the DCW202 begins on a word boundary immediately following the last DCW202 or control data associated with the last DCW 202. When the last DCW202 in the TCA180 specifies control data that is not an integer word, the subsequent LRC field 184 begins on the word boundary immediately following the control data.
For some devices, the list of DCWs 202 may be expanded beyond the capacity of the TCA 180. In this case, the TCA extension (TCAX) field may be specified to include other DCWs and be transmitted as if TCAX were output data (e.g., transmitted as part of the output transport data IU). However, TCAX is considered a logical continuation of TCA180, rather than transporting data. TCAX is specified in TCA180 by the Transport TCA Extension (TTE) DCW. TCAX and TTEDCW are described further below, and embodiments of TCAX are shown in fig. 12 and 13.
As shown in fig. 3 and 4, the TCCB may include a Transport Command Area Trailer (TCAT) 182 that provides additional information about the TCCB, including various count information. In one embodiment, the length of the TCAT182 is 2 words when unidirectional data transfer is specified (R bit or W bit is set to 1) or when no data transfer is specified (R bit and W bit in TCW are set to 0 at the same time). When bidirectional data transfer is specified (both the R and W bits in TCW are set to 1), TCAT182 is 3 words in length.
For example, when unidirectional data transmission is specified, the transmission count or Data Length (DL) field 186 specifies a 32-bit unsigned integer count of the total data to be transmitted ("transmission count value"). When a read operation is specified (TCWR bit is 1), the value in the transport count field in the TCAT may be determined by summing the count field values in the DCWs 202 that respectively specify a read type command. The total is rounded up to the nearest multiple of 4 and the rounded total is incremented by 4 to reach the transmission count value. When a read operation is specified, the transfer count value should equal the value in the TCW input count field 160, rounded up to a multiple of the next 4, plus 4.
When a write operation is specified (W bit in TCW is 1), the count field value in DCW202 for the specified write command is summed. Further, the count field value in all transport commands DCWs (described further below) specifying the transport of the Transport Command Meta Information (TCMI) plus the size of the reserved field in the TCMI is added to this total (note that the size of the TCMI reserved field may be set to 0). The total count of Control Block Check (CBC) or Cyclic Redundancy Check (CRC) bytes and padding bytes specified by any TIDAW is added to this total. The total is rounded up to the nearest multiple of 4 and the rounded total is incremented by 4 to reach the transmission count value. When a write operation is specified, the transfer count value should equal the value in the TCW output count field 158, rounded up to a multiple of the next 4, plus 4. When neither a read operation nor a write operation is specified (both the W bit and the R bit in the TCW are 0), the transmission count value should be 0.
When a bi-directional data transfer is specified, the DL field 186 is a write count and specifies a 32-bit unsigned integer count of the total output data to be transferred. The transport count value in the DL field (write count field) in the TCAT182 is determined as described above for the write operation. The Bidirectional Read Data Length (BRDL) field 188 specifies a 35-bit unsigned integer of the total input data to be transmitted. The transfer count value of the BRDL field 188 is determined for the read operation as described above.
In one embodiment, for a write operation or a bidirectional operation, the DL field should contain a 4-byte unsigned binary integer that specifies the number of bytes to be passed by the channel to the control unit to perform the operation and includes all intermediate and final stuff bytes and CRC bytes, as well as the COB, any COB stuff bytes and COBCRC bytes if the COB is included in the first transfer data IU of the write operation. If TTEDCW is located in TCA, the DL field also includes TCAX, any TCAX padding bytes, and TCAXCRC bytes.
Fig. 8 and 9 are tables summarizing TCW input count, output count, and TCAT transmission count values to determine unidirectional and bidirectional transmissions, respectively.
For bi-directional operation, the Bidirectional Read Data Length (BRDL) field includes a 4-byte unsigned binary integer that specifies the number of bytes to be transferred by the control unit to the channel to perform the operation, and includes any padding bytes that need to be rounded to a word boundary (if not already located on a word boundary) plus a 4-byte CRC. For non-bidirectional operation, if the transport command IU contains a BRDL field, the device should recognize TCH content errors caused by read-write collisions.
Referring now to FIG. 10, a Device Command Word (DCW) 202 specifies a command to be executed. For a command to initiate a particular I/O operation, it specifies the byte count of the operation to be performed, the operations that need to be performed each time the transfer with storage is complete, and other options. The TCW140 specifies one or more memory regions associated with DCW data transfer operations according to the operation specified by the command, specified by either the input data address field 146 or the output data address field 144 of the TCW140, and the TCCB170 that includes the DCW 202. Whether the input data address field 146 or the output data address field 144 directly or indirectly specifies storage is specified by the input TIDA and output TIDA flags in the TCW 140.
In one embodiment, the DCW202 is an 8 byte control block that is specified in the TCW140 on a word boundary. DCW202 includes fields such as a command code field 204, a control flags field 206, a control data count 208, and a DCW data count 210.
The command code field 204 (e.g., bits 0-7 of word 0) specifies the operation to be performed. Whether the command is valid is device dependent and depends on the value of the service opcode field 198 in the TCAH 178. Basic commands include read, write, control, detect, and transfer. Channel subsystem 114 distinguishes between the following operations: control, forward output (write), forward input (read, detect ID), reverse input (reverse read), branch (transfer in channel), and transfer. When executed, some commands do not result in data transfer, but result in devices chained together and starting execution of the next command when all command chaining conditions are met. Each basic operation is described below.
The read command initiates execution of a device operation that enables device-to-channel data transfer. The write command initiates execution of a device operation that effects a channel-to-device data transfer. The control command initiates execution of device operations using the control data provided in the DCW. These detection commands are similar to the read commands except that the data is obtained from the detection indicators, not from the recording source. The control commands and their associated control data provide for management of a particular I/O device and control of the device during execution of the I/O command. The transfer command is used to manage the I/O operation and the data transfer through the channel path, and is not a setting specific command. These commands govern the transmission of control block check data, such as Cyclic Redundancy Check (CRC) data, and the transmission of other DCWs in the transport data IU.
The Control Data (CD) count field 208 specifies the number of bytes of control data associated with the DCW 202. For example, byte 3 of word 0 specifies the control data length (in bytes). If the command code specifies a command requiring control data and byte 3 of word 0 specifies a control data count less than that required by the command, then the device check condition or TCCB content error is identified. If the command code specifies a command requiring control data and byte 3 of word 0 contains 0 or a value specifying that the TCA end is exceeded (or the end of TCAX specified is exceeded), the identifying device detection program checks the condition or TCCB content.
The DCW data count field 210 specifies a byte count of data (e.g., data to be transferred for a read or write operation, i.e., guest data) specified by the TCW for the DCW 202. For example, the DCW data count is included in word 1 of the DCW202 of FIG. 10 and specifies a 32-bit unsigned integer byte count in the storage area that the TCW specifies for that DCW. The DCW data count field 210 indicates the number of bytes to be transferred between the channel and the control unit during execution of the DCW, excluding any padding bytes or CRC bytes.
Referring now to FIG. 11, in one embodiment, the DCW202 includes a plurality of control flags 206. The Chain Command (CC) flag 212 specifies that command chaining needs to be performed. The command chaining results in the execution of the next DCW202 in the TCA180 when the current device operation is completed normally and after the device end on the device is identified. The CC flag 212 is set to 0 in the last DCW in TCA. In the embodiment of FIG. 10, bit 9 of word 0 (the CC bit), when 1, specifies the command chaining. When 1, this bit causes the operation specified by the next DCW to be initiated when the current DCW completes normally. When the control data count is 0, the next DCW immediately follows the DCW in TCA or TCAX. When the control data count is not 0, the next DCW immediately follows the control data rounded to the word boundary specified for the DCW. In one embodiment, when the chain command flag is 1, the position of the next DCW in TCA or TCAX is determined by adding the values in the 8 and CD count fields to the position of the current DCW and forensing up to the nearest word boundary. If the chain command flag is 1 in the DCWs of the TAC, the next DCW position exceeds the end of TCA and specifies TCAX, the next DCW being located at the beginning of the specified TCAX.
In one embodiment, the control flags field includes a Suppress Length Indication (SLI) field 214. When the channel 128 and control unit 118 support DCW incorrect length functionality, a bit (e.g., bit 2) is provided in the SLI flag field 214 that controls whether a command link occurs on an incorrect length condition and whether the incorrect length is indicated by the control unit in the transport response IU when the incorrect length condition is detected by the control unit 118. The incorrect length condition is detected by the control unit if the DCW data count does not match the amount of data that the device needs to use to write the DCW, or if the DCW data count does not match the amount of data available on the device to read the DCW. When the lane and control unit do not support the DCW incorrect length function, bit 2 is reserved and set to 0 by the lane and ignored by the control unit.
When SLI flag 214 is 1, the incorrect length indication is suppressed. When both the CC and SLI flags are 1, command chaining occurs regardless of whether an incorrect length condition exists. When the SLI flag 214 is 1 and an incorrect length condition exists for the current DCW, the command chaining (if indicated) should be allowed and the control unit continues to execute the next DCW. In one embodiment, the SLI flag is to be set to 1 or otherwise activated in all DCWs that need to suppress an incorrect length indication.
If the SLI flag is 0 and an incorrect length condition exists for the DCW, the command link (if indicated) is not allowed and control unit 118 terminates the I/O operation. In channel subsystem 114, if the SLI flag is 0 and an incorrect length condition exists, processing of TCA180 terminates and the subchannel is made pending by the incorrect length indicated in the subchannel state. When an incorrect length condition exists for DCW202 and SLI flag 214 in the DCW is set to 1, data transfer is performed according to the following description, otherwise the operation is terminated and an abort condition for the operation should be reported.
For read DCW202, if the DCW data count is greater than the amount of data available for the command on device 116, the following rule applies. If the CC flag 212 is 1 (indicating a chain), the available data on the device 116 is transferred to the lane 128 and the stuff bytes are transferred (set to 0) so that the amount of data transferred for the DCW202 equals the DCW data count. All data transmitted, including the stuff bytes, is included in any CRC calculation required for operation. If the CC flag 212 is 0 (not indicating a chain), then the available data on the device should be transferred to the channel, no additional data should be transferred or padding bytes (set to 0) should be transferred so that the amount of data transferred for DCW equals the DCW data count. The data being transferred plus any padding bytes should be included in any CRC calculation required for the operation. For this case, there is no model dependency on whether stuffing bytes are transmitted. If the DCW data count is less than the amount of data available on the device for the command, only the amount of data equal to the DCW data count is transferred to the channel 128 for the DCW 202. Only the data that is transmitted should be included in the CRC calculation required for the operation.
For write DCW202, if the DCW data count is greater than the amount of data required by device 116 for the command, the following rule applies. If the CC flag 212 is 1 (indicating a chain), then the amount of data specified by the DCW data count should be transmitted to the lane 128. The transmitted data should be used for any CRC calculation required for operation and the data not required by device 116 is discarded. If the CC flag 212 is 0 (not indicating a chain), the amount of data required by the device 116 is transmitted to the control unit 118. The extra data is transferred to the next intermediate CRC word or until the data count of the DCW is exhausted. All data transferred is used for any CRC calculation required for the operation. If the DCW data count is less than the amount of data required by device 116 for the command, the amount of data specified by the DCW data count is transmitted to control unit 118. The transmitted data is used in any CRC calculation required for the operation.
For a write DCW202 where the DCW data count is greater than the amount of data needed by the device 116 for the command and the CC flag 212 is 0 (not indicating a chain), the amount of data needed by the device 116 is transferred. The data then continues to be transmitted until the next CBC is specified for insertion, or until the total amount to be transmitted equals the DCW data count. An exemplary command code is shown in FIG. 12, which shows 6 TCW commands and indicates which flags are defined for each command. The transfer command DCW is a type of DCW that does not specify a specific data transfer command (i.e., client data requested to be transferred by a host computer instruction), but specifies a transfer command that executes a support function associated with a transfer mode I/O operation. The transfer command DCW may specify control data and may also specify the transfer of Transfer Command Meta Information (TCMI). The TCMI includes data for controlling transport functions in the I/O operation, e.g., I/O operation status on the device, information about other DCWs that cannot be placed in or may be contained in the current TCCB, and Control Block Check (CBC) information such as Cyclic Redundancy Check (CRC) data.
When the transport command DCW specifies that the TCMI is to be transported to the device, the TCMI is transported as output data (e.g., in a transport data IU). The size of the TCMI is command dependent, for example a multiple of 4. When the size of the TCMI is an even multiple of 4, the TCMI may be extended by 4 reserved bytes, an output storage area is specified using the TIDAW, a CBC flag is inserted as 1 in the last TIDAW for specifying storage containing the TCMI, a chaining command bit is as 1 in a transfer command DCW specifying the TCMI, and a subsequent DCW specifies the TCMI or transfer of output data. It is to be noted that, when the transfer command specifies the transfer of the TCMI to the device, and the TCMI is extended by 4 reserved bytes because all of the above conditions are satisfied, the 4 reserved bytes are not included in the data count value in the transfer command DCW, but are included in the following values: for specifying the count value in the last TIDAW stored containing the TCMI, the output count value in the TCW, and the transfer count value in the associated TCCB (for unidirectional data transfer, for bidirectional transfer, included in the write count value in the associated TCCB).
In one embodiment, the TCMI includes query information (by querying the DCW), a CBC offset block (by transmitting the CBC offset block DCW), and a TCA extension (by transmitting the TCA extension DCW).
An embodiment of data specified by a class of transport commands DCW, referred to as Transport TCA Extension (TTE) commands, included in the TCA180 of the TCCB170 and specifying a TCA extension (TCAX) 220 to be transported to the control unit 118 is shown. TCAX is considered a logical extension of TCA 180. For some devices 116, the list of DCWs 202 associated with I/O operations exceeds the number of DCWs that can be accommodated in the TCA 180. In this case, TTEDCW may be included at the end of TCW140, which specifies TCAX220 as the outgoing data transport (e.g., in a data transport IU). The contents of the TTEDCW may include a command code that includes a transport TCA extended command (e.g., a value of 50 hex).
For example, the length of TCA180 can be varied to a maximum size of 240, and the DCW can have 8 bytes. Thus, in this example, up to 30 DCWs may be transmitted in the TCCB. However, for a DCW202 specifying a control command that requires control data, the control data immediately follows each DCW202 in the TCCB. As such, the TCCB170 containing such commands is defined to be less than 30 DCWs. TTEDCW may be used to specify other DCWs that cannot fit into TCA180 that are needed for I/O operations.
As shown in FIG. 13, the TCA extension (TCAX) is a variable length region that is a logical continuation of the TCA180 in another transport command IU or TCCB and includes a list of DCWs and their associated control data. The TCAX contains one or more other DCWs for TCWI/O and their associated control data (other than that transported in the initial TCCB), which may be sent through another TCCB or transport data IU to extend the list of DCWs needed for I/O operations. In one embodiment, TCAX is an integer multiple of 4 in length.
As shown in FIG. 13, in one embodiment, the TCAX220 includes control data for the DCW202 and/or a previous DCW. When the last information in the TCAX220 is the DCW202, the end of the DCW202 defines the end of the meaningful information in the TCAX 220. When the last information in TCAX220 is control data, and the control data ends on a 4-byte boundary, the end of the control data defines the end of meaningful information in TCAX 220. When the last information in TCAX220 is control data and the control data does not end on a 4-byte boundary, a stuff byte is appended to the control data to reach the 4-byte boundary and the end of the stuff data defines the end of meaningful information in TCAX 220. When the size of meaningful information in TCAX220 divided by 4 equals an odd number, no bytes are reserved; otherwise, the 4 bytes following the meaningful information in TCAX220 are reserved and should contain 0. When the control data for the last DCW202 in TCAX180 is contained in TCAX220, the control data is the first data in TCAX 220. Other DCWs and control data in the TCAX220 are processed in a manner defined for the TCA 180.
In one embodiment, TTEDCW is the first DCW202 in TCA180 when TCOBDCW (described further below) is not located in TCA 180. TTEDCW is the second DCW202 in TCA180 when TCOBDCW is located in TCA 180. The TTEDCW data count specifies the length of TCAX220 and may be an integer multiple of 4 bytes. The TTEDCW control data count is 0 and the chain command flag in TTEDCW is set to 1.TTEDCW data does not include TCAXCRC or TCAX padding bytes.
The TTE command (TTEDCW) should be sent to a device indicating support for the TTE command and sent when the TCA length has a certain maximum value (e.g., 60 words) and the control data for the last DCW in the TCA extends beyond the last byte in the TCA, or the TCA length is greater than, for example, 58 words and one or more other DCWs are needed for the I/O operation. When COB is provided in the write transport data IU, TCAX should follow COBCCRC. When COB is not provided, TCAX should be sent with the first write transport data IU of the I/O operation.
Another type of DCW is a Transport CBC Offset Block (TCOB) DCW, which is a command to transport a CBC Offset Block (COB) to the control unit. The CBC data instructs the control block to check the data for verifying the correct amount of input or output data to be transferred in the I/O operation. In one embodiment, CBC data is Cyclic Redundancy Check (CRC) data, COB is a CRC offset block, and TCOBDCW is a transport CRC offset block DCW. In general, a Cyclic Redundancy Check (CRC) is an error detection code configured to detect unexpected changes in the original data sent between the channel 128 and the control unit 118. A CRC-enabled device (e.g., channel 128) computes a short, fixed-length binary sequence for each block of data to be transmitted or stored and appends the sequence to the data, thereby forming a code word or "CRC word". For example, when CRC generation is provided, the channel 128 generates a CRC on the transmit data and inserts the value calculated at the end of the last data byte. When a CRC word is received or read, the receiving device (e.g., control unit 118) compares its check value to the value newly calculated by the data block, or equivalently, performs a CRC over the entire codeword and compares the resulting check value to the expected remaining constant. If the check values do not match, the block contains an error in the transmitted data. Although CBC is described as CRC data in the embodiments herein, it is not limited thereto.
The exemplary TCOBDCW specifies the COB to be transmitted to the device. The exemplary TCOB has a command code that contains a transmit CRC offset block command (e.g., a value of 60 hex). The chain command flag is 1. When CD count 208 of TCOBDCW is not 0, COB immediately follows TCOBDCW in TCA180 and CD count 208 specifies the number of CRC offsets in COB multiplied by 4. When the CD count 208 is 0, COB is specified as TCMI in TCW, the location of COB is specified by the output data address field 146 in TCW, and the count field specifies the number of CRC offsets in COB multiplied by 4.
As shown in fig. 14, COB222 specifies the location of the intermediate CRC word within the transport data that is to be written or read data transferred (e.g., by the transport data IU). In one embodiment, the COB is provided when the first DCW202 in the TCA180 contains a TCOB command (i.e., TCOBDCW). The intermediate CRC offset is the CRC word between data in the data transport IU and before the end of the IU. COB222 contains a 1-word value list, referred to as CRC offsets 224, each offset identifying the byte offset of each intermediate CRC word in the transmitted data. For example, COB is a variable length control block that includes a list of 4 byte entries, each of which identifies the CRC offset specified by TIDAW to be inserted into the output data.
In the embodiment shown in fig. 14, COB222 includes 1 to N +1 words of the intermediate CRC offset (CRC offset word 224). If COB222 is provided in the transport data IU, the COB may also include 0 or 1 words of stuff bytes and 1 word of CRC. Padding bytes may be provided so that the words containing the CRC lie on word boundaries other than double word boundaries. The last word of the COB should contain a CRC that covers the intermediate CRC offsets 0 to N and the body pad word (if present). If COB is provided as control data for TCOBDCW, there should be no COB padding or CRC, and the control data count should be equal to 4 times the number of intermediate CRC offset fields in COB.
For write operations, TCOBDCW specifies that COB be transmitted to device 116. The TCOBDCW command code includes a TCOB command, which is, for example, a value of 60 hex. The location of the COB is determined by the control data count and may be provided in the first write transport data IU of the I/O operation or as control data of the TCOBDCW following the I/O operation. Li8ru, when the CD count of TCOBDCW is not 0, COB222 immediately follows TCOBDCW in TCA180, and the CD count specifies the number of CRC offsets in COB multiplied by 4. When the CD count is 0, the COB222 is designated as the TCMI to be transferred with the output data, and the location of the COB is designated by the output data address field 144 in the TCW 140.
Each intermediate CRC offset 224 in the COB222 indicates an offset (in bytes) relative to the first byte of data in the transport data IU. If COB222 is provided in the transport data IU, the first byte of data to be written for transport is either the first byte immediately following COBCCRC (if TCAX220 is not provided) or the first byte despite TCAXCRC (if TCAX is provided). If COB is provided as DCW control data in TCA180, the first byte of data to be written for transfer is the first byte in the transfer data IU (if TCAX220 is provided). When provided in a transport data IU, the COB is provided in the first write transport data IU of the I/O operation.
Yet another type of transport command DCW is a query DCW that is used to determine the status of TCWI/O operations on the device 116. The interrogate command does not initiate an operation on the device 116, does not affect the state of the device 116, and does not reset the loyalty and associated logical paths associated with the device 116. The exemplary query DCW includes a query command code (e.g., containing a value of 40 hex). In addition to the command code, the SLI flag, count and CD count fields, all other fields in the DCW should contain a 0, otherwise contain a program check condition detected by the device. If the CD count of the interrogating DCW is greater than 0, then the interrogating data is specified.
An inquiry operation is performed on the logical path and the device 116 that is performing the TCWI/O operation to obtain data related to the operating state on the device 116. In one embodiment, the TCCB170 of the query operation includes a single DCW having a query command code (e.g., X' 40). The TCAH178 of the query operation may contain an R bit set to 1 to specify a read data transfer for the operation. An inquiry operation is recognized on the control unit 118 when the control unit 118 accepts a transport command IU specifying an inquiry command. When an inquiry operation has been identified on the control unit 118 and the control unit 118 is able to successfully execute the inquiry command, the control unit 118 may provide status in the transport response IU including inquiry extended status describing the status of the logical path and device address specified by the inquiry transport command IU.
Referring now to FIG. 15, an embodiment of a method of performing a transport mode I/O operation 300 is shown. The method includes one or more stages 301-305. In one embodiment, the method includes executing 305 all of the stages 301 in the order described. However, some stages may be omitted, some stages may be added, or the order of the stages may be changed.
At stage 301, the host computer (e.g., OS 110) executes an instruction (e.g., STARTSUBCHANNEL) that causes an ORB to be transmitted to the channel subsystem 114 and specifies the TCW 140. In one embodiment, program check conditions related to availability of TCW fields specific to the capture status and transfer of a specified TCCB170 are checked by the channel subsystem 114 to determine whether to transfer the TCCB170 to the I/O device 116. If such a program check condition exists, the TCCB170 is not transmitted and the program check condition is identified. For example, the TCCB address field 148 specifying the available storage locations is checked. If the TCCB-TIDA flag is 1, then it is also checked that the TCCB address field 148 specifies an address located on a quad-word boundary. Other program check conditions are described further below.
In stage 302, when the channel 128 sends a transport command IU172 including a control block (e.g., Transport Command Control Block (TCCB) 170) of the TCW140 and associated control information to the selected device 116, a TCWI/O operation is initiated using the I/O device (e.g., by the control unit 118). In one embodiment, information associated with the performance of I/O operations and device operations (e.g., commands, input data, and output data) is executed as Information Units (IUs) between the channel 128 and the control unit 118. In one embodiment, the IU takes the form of an SB-4 Information Unit (IU).
In one embodiment, an IU or other message is sent between a channel and a control unit via one or more exchanges. For all SB-4 link control functions and all SB-4 device level functions executing in Command mode, a switch pair consisting of two unidirectional switches is required (one switch used by the channel 128 to send IUs and the other switch used by the control unit 118 to send IUs). For device-level functions performed in transport mode, a single bidirectional switch, also referred to as a transport switch, is used. The IUs sent by the channel 128 during execution of the SB-4 link control function or execution of the SB-4 device level function in command mode are limited to one exchange and the IUs received by the channel during operation are limited to another exchange. An exchange in which a channel 128 sends an IU is referred to as an outbound exchange, and an exchange in which a channel 128 receives an IU is referred to as an inbound exchange. When outbound switching and inbound switching exist simultaneously between channel 128 and control unit 118 to perform the same link-level or device-level functions, we consider that there is a switching pair and control unit 118 is considered to be connected to channel 128. The channel program used in a single connection uses only one switch pair. If a connection is deleted during execution of the channel program because the swap is closed, a new swap pair is generated to complete the channel program. The channel 128 may initiate an exchange pair by sending an IU (or initiating IU) (opening a new exchange) as an unsolicited command or unsolicited control information category. The control unit 118 may initiate the exchange pair by sending the data information category as unsolicited control or unsolicited.
The UIs transmitted by the channel and control unit during the execution of an I/O operation (executed in transport mode) are limited to a single two-way exchange (referred to as a transport exchange). The channel 128 opens the transport exchange by sending a transport command IU (initiating IU) that is an unsolicited command class. The channel 128 may open multiple transport exchanges, each for a different device 116 or for the same device 116 located on a different logical path. A new transport exchange may be opened for a particular device on the logical path if a transport exchange already exists for that device and logical path to perform the query operation; otherwise, the channel 128 waits for the existing transport exchange or exchange pair to close before initiating a new transport exchange for a device on the logical path.
At stage 303, control unit 118 receives TCCB170 and transport command IU172 and may accept TCCB170 if certain conditions are met. Upon receiving the transport command IU172, the TCCB170 is considered to be located on the control unit 118 until TCCB170 execution on the control unit 118 is considered to be complete. If the transport command IU172 is not accepted due to an error condition, the transport response IU is returned to the channel 128 and the initial status flag is set to 1 to indicate that an error occurred before initiating execution of the TCCB170 on the device 116. The control unit 118 may provide error information in status and I/O extended status fields in the transport-response IU (described below) to identify the transport command IU error. In one embodiment, the exemplary conditions described below should be satisfied in order to accept the transport command IU172 on the control unit 118:
1) the transport command IU satisfies the following integrity check:
a) for control units that do not support bidirectional operation, the LI field plus 8 in the TCH should specify a data volume equal to the data volume received by the control unit for the transport command IU, otherwise a transport command IU integrity error caused by a data count error should be identified;
b) for control units supporting bidirectional operation, the LI field plus 8 or 9 in the TCH should specify a data volume which is equal to the data volume received by the control unit for the transport command IU, otherwise a transport command IU integrity error caused by a data counting error should be recognized; and
c) the LRC field in the TCCB should be valid, otherwise, a transport command IU integrity error caused by an invalid LRC should be recognized.
2) The designated logical path should be established, otherwise an "logical path not established" error will be identified;
3) for those commands that require a device to be installed and ready, the device address should specify the device that has been installed and ready, otherwise an "address exception" condition will be recognized;
4) if the control unit does not support bidirectional data transmission or the transmission command IU does not contain a BRDL field, the R bit and the W bit should not be set to 1 in the TCH, otherwise a TCH content error will be identified;
5) the TCCB in the transport command IU should satisfy all of the following conditions, otherwise a TCCB content error will be identified:
a) the L2 field should specify a length of exactly 8 bytes, which is greater than the L1 field, and contains a value of at least 20 bytes and no greater than 252 bytes;
b) byte 1 of word 0 of TCAH should be 0;
c) the format control field in TCAH should be equal to hex '7F';
d) the service opcode in TCAH should contain a valid value (see 8.13.4.4);
e) if both the R bit and the W bit are set to 0, the Data Length (DL) field should be set to 0;
6) if another TCWI/O operation is being performed for the logical path and device address specified in the transport command IU, then the service opcode should specify hex '1 FFF' and the command code in the first DCW of the TCA should specify the interrogate command code, otherwise a "No interrogate second operation" error will be identified.
In one embodiment, the channel 128 considers that a connection exists when the transport command IU172 is sent and the control unit 118 considers that a connection exists when the transport command IU172 is accepted. In this way, the channel 128 is not concerned with whether the control unit 118 has accepted the TCCB170 or is not concerned with the progress of the I/O operation on the device 116 until the control unit 118 terminates the I/O operation using the transport response IU. In one embodiment, the channel 128 may set a time window for which a response is received from the control unit such that if the channel does not accept a transport response IU within the window, the channel will recognize the transport command timeout.
At stage 304, when TCCB170 has been accepted, control unit 118 processes TCA180 and executes each DCW 202. The executed DCW202 is identified as the current DCW. When the DCW202 is the first DCW of the transport mode program (i.e., the first DCW in the TCCB) and is selected for execution by the I/O device 116, or when a subsequent DCW202 takes over control of an I/O operation during a command link, that DCW202 becomes the current DCW. The first DCW to execute may be considered to be located on offset 0 of TCA180 in TCCB 170. Each other DCW in the channel program is located in the TCA180 (or in the TCAX 220) and is used when a DCW is needed by the I/O device 116.
Command chaining is controlled by a DCW Chain Command (CC) flag in the DCW. The flag specifies the action to take when the current DCW is exhausted. The linking occurs between successive DCWs within the TCA. When TCAX is specified, chaining also occurs between the last DCW in TCA and the first DCW in TCAX, and between consecutive DCWs within TCAX. When the current DCW specifies command chaining and no abnormal condition is detected during operation, completion of the current DCW causes the next DCW to become the current DCW and be executed by the device. If TCAX is specified and the offset of the next DCW exceeds the end of TCA, the chain continues with the first DCW of TCAX, whose TCAX offset is determined by subtracting the TCA length from the calculated offset. Thus, command chaining is performed in descending order of TCA offsets, and then TCAX offsets when designated. If a condition occurs (unless the SLI field 214 in the DCW is activated), such as concern, device check, unit exception, or incorrect length, the order of the operations is inferred, and the state associated with the current operation results in an interrupt condition, in which case the new DCW is not executed.
During processing of DCW101 in TCCB170, data requested to be transferred via I/O operations is sent between channel 128 and control unit 118 via one or more transport data IUs. A read operation performs only read data transfers, a write operation performs only write data transfers, and a bidirectional operation may perform both read and write data transfers.
Referring now to FIG. 16, for a write operation or a bi-directional operation, channel 128 sends one or more transport data IUs 310 to control unit 118 to transport write data 312 for the operation. For a read operation or a bi-directional operation, the control unit 118 sends at least one transport data IU314 to the channel 128 to transport read data 316 specified for the operation. Stuff bytes 318 may be included in the last word in the data region for which the CRC is to be calculated and used to stuff the data region to the next word boundary when the data region to be covered is not an integer number of data words. This applies to the data regions to be covered by COB, intermediate and final CRC. The values for the stuff bytes are model dependent.
When the transport data IU is the last transport data IU sent by the channel 128 or the control unit 118 for a TCWI/O operation, a final CRC field 320 is included within the transport data IUs 310, 314. In one embodiment, final CRC field 320 includes a word-aligned 32-bit redundancy check code. For read or write operations, the DL field in the TCCB specifies the amount of data to be transferred during the operation, which may include all necessary padding and CRC bytes. For bi-directional operations, the DL field of the TCCB170 specifies the amount of data to be transferred for the write data transfer portion of the operation, and the BRDL field specifies the amount of data to be transferred for the read data transfer portion of the operation. These data volumes may include all necessary padding and CRC bytes.
During a write data transfer, data is transferred to control unit 118 via one or more transport data IUs 310 on a transfer swap associated with a TCWI/O operation. In one embodiment, in addition to the operational first write transport data IU310, the channel 128 requires a transport-ready IU to be fetched from the control unit 118 before each transport data IU310 can be sent. The control unit 118 may request additional data by sending other transfer ready IUs until it has requested all of the data specified by the DL field 186 of the TCCB170 for the write operation. For a write operation, the next IU that the control unit 118 sends after completing the data transfer specified by the DL field in the TCCB is the transfer response IU. For bi-directional operation, the next IU that the control unit 118 sends after completing the data transfer specified by the DL field in the TCCB may be a transfer data IU or a transfer response IU.
During read data transfers, data is transferred to the channel 128 via one or more transport data IUs 314 on a transport swap associated with TCWI/O operations. The amount of data transmitted by each transport data IU is determined by the control unit 118 and may be set to any value as long as the total amount of data transmitted in all transport data IUs 314 for operation does not exceed the value in the DL field 186, or the value in the BRDL field 188 for bi-directional operation. For a read operation, if the amount of data sent by the control unit is less than the DL field in the TCCB, the remaining count in the transport response IU should be the difference between the amount of data sent by the CU and the DL field in the TCCB. If the remaining count provided by the control unit in the transport response IU does not match the difference between DL and the number of bytes actually received by the channel, the channel identifies a device level protocol error. For bi-directional operation, if the amount of data sent by the control unit is less than the BRDL field in the TCCB, the BRDL remaining count in the transport response IU should be the difference between the amount of data sent by the CU and the BRDL field in the TCCB. If the remaining count provided by the control unit in the transport response IU does not match the difference between the BRDL and the number of bytes actually received by the channel, the channel identifies a device level protocol error.
As shown in FIG. 16, one or more intermediate CRC words 320 may be located in transport data IU310 sent on lane 128. The intermediate CRC word 320 provides a CRC check on the data region prior to transmission of the entire data region specified by the TCA 180. When COB222 is transmitted in a transport data IU, COBCRC word 322 may be located in transport data IU 310.
Referring now again to FIG. 15, at stage 305, the TCWI/O operation is terminated by the channel 128 or the control unit 118. As a result of an exception condition or termination of an initiated program, the channel 128 may initiate a terminate TCWI/O operation. The control unit 118 may initiate a termination operation as a result of completing the execution of the operation or as a result of detecting an abnormal condition during the execution of the command. The control unit 118 may initiate the termination of the TCWI/O operation by sending a transport response IU or, in case of a certain error, by terminating the exchange. In one embodiment, the control unit 118 may initiate the termination of the TCWI/O operation in any of the following cases: all DCWs 202 in the executed TCA180 (and TCAX, if specified); when DCW incorrect length function is supported and SLI214 is set to 0, an incorrect length condition for DCW has been detected; a device check condition has been detected; abnormal conditions such as transmission errors; or another error has been identified that requires the exchange to be terminated.
Referring now to FIG. 17, in one embodiment, a status condition is generated by the channel subsystem and the device when an I/O operation or sequence of I/O operations initiated by the execution of STARTSUBCHANNEL terminates. The generation of these conditions may draw attention to the program through an I/O interrupt or by executing a TESTPENDING ERRPUTION instruction. The status conditions as well as the addresses and the count indicating the range of the operating sequence are provided to the program in the form of a sub-channel status word (SCSW) 400. SCSW400 is stored in Interrupt Response Block (IRB) 402 during execution of the testschannel instruction. When storing the transmission mode IRB, other information describing the operational state is also stored in the transmission state block.
Generally, I/O operations are performed until the device notifies the master interrupt status. The master interrupt state may be notified during the initiation of the I/O operation or at a later time. The I/O may be terminated by the channel subsystem performing a clear or stop function upon detecting a device failure, program check, chain check, protection check, or incorrect length condition, or a clear, stop, or channel path reset function as a result of executing a CLEARSUBCHANNEL, HALTSUBCHANNEL, or RESETCHANNELPATH instruction, respectively. I/O interrupts provide a way for a CPU to change its state in response to conditions that occur on an I/O device or subchannel. These conditions may be caused by external events on the program, channel subsystem, or device.
The conditions that result in the initiation of an I/O interruption request are referred to as I/O interruption conditions. When an interrupt condition is recognized by the channel subsystem, the interrupt condition is indicated on the appropriate subchannel. The subchannel is then considered state pending. The subchannel becoming pending causes the channel subsystem to generate an I/O interrupt request. The I/O interrupt request remains pending until it is accepted by the CPU in the configuration, retired by the channel subsystem, or cleared by executing a TESTPENDING INTERRUPTION, TESSTUBCHANNEL, or CLEARUBCHANNEL instruction, or cleared by a subsystem reset. When the CPU accepts the interrupt request and stores the associated interrupt code, the interrupt request is cleared. When the pending interrupt is cleared by executing TESTPENDING TERRUPTION, the subchannel remains state pending until the associated interrupt condition is cleared when either TESSTUBCHANNEL or CLEARUBCHANNEL is executed or when the subchannel is reset.
The I/O interrupt condition is typically cleared by executing a TESSTUBCHANNEL instruction, which, if executed, specifies that the subchannel has an I/O interrupt request pending, clears the interrupt request and the interrupt condition on the subchannel at the same time. Interrupt requests and interrupt conditions can also be cleared through CLEARUBCHANNEL. If the subchannel is currently pending for startup and if the state contains either the device side alone or the device side including the attached control unit side, the device side state condition generated by the I/O device and provided after the end of the last I/O operation to start the function is reset by the channel subsystem on the subchannel without generating an I/O interrupt condition or I/O interrupt request. If any other status bit accompanies the device side status bit, the channel subsystem generates an I/O interrupt request and indicates a delay condition code of 1. When an I/O operation terminates because the channel subsystem detects an exception condition during the command initiation sequence, the state of the interrupt condition described is placed on the subchannel, causing it to become state pending. If the device detects an abnormal condition, the device status field of the associated SCSW identifies the condition. When a command link occurs, the generation of a state by the device does not cause an interrupt, and this state is not available to the program.
The channel subsystem initiates an I/O interrupt request without having to communicate with the device or without having to receive a status byte from the device when it detects any of the following interrupt conditions:
1) a design error associated with the contents of the ORB delivered to the subchannel by the last execution of startsecunnel;
2) setting a halt flag to 1 in the extracted first CCW that initiates execution of a CCW channel program for STARTSUBCHANNEL or RESUMESUBCHANNEL, and halting inhibit interrupts not specified in command pattern ORB; or
3) A design error associated with the first CCW, TCW, TIDAW, TCCB fetch, data fetch, IDAW, or MIDAW.
These interrupt conditions from the subchannel (except for the suspended condition) may be accompanied by other subchannel status indications, but the device status indications are all stored as 0's.
The channel subsystem sends a clear signal to the device when a status including a device check is provided to the disabled subchannel or when the device is not associated with any subchannel. However, if the provided state does not contain a device check, the state is accepted by the channel subsystem and discarded without causing the subchannel to become state pending.
The subchannel status word (SCSW) 400 provides an indication to the program describing the status of the subchannel and its associated devices. When the transmission mode IRB402 is stored, other information describing the operational state and its associated devices is also stored in the transmission state block associated with the operation. SCSW may describe the condition to terminate operation if the stop, resume or start functions have been performed.
In one embodiment, SCSW is stored while testschunghanne is executing and the specified subchannel is operational. SCSW is placed in words 0-3 of IRB designated as the textschannel operand. When SOTRESUBCHANNEL is executed, SCSW is stored in words 7-9 of the sub-channel information block.
SCSW includes a number of fields, such as a delay Condition Code (CC). If the delay condition code is not 0, then it is used to indicate whether a condition is encountered that prevents the subchannel from being in a subchannel-device active state while the subchannel start is pending or paused. In one embodiment, when the delay condition code 1 is set, the auxiliary status bit is 1, and the main status bit is 0, the current status may be associated with a command mode channel program specified by (or implied by) a STARTSUBCHANNEL instruction that precedes a most recently executed STARTSUBCHANNEL that specifies a transmission mode channel program. For this case, the status modifier may be 1 in the device status field.
The subchannel status field is included in the SCSW400 and is used by the channel subsystem to indicate an auxchannel status condition. For example, the subchannel status field is contained in bit positions 8-15 of word 2 of SCSW. The subchannel state conditions are detected by the channel subsystem and indicated in SCSW. Except for conditions caused by equipment failures, they can only occur when the channel subsystem is involved in performing a stop or start function. The subchannel status field makes sense each time a subchannel is pending for a state and with any combination of primary, secondary, intermediate, or alert states. The contents of the subchannel status field are meaningless when a subchannel is pending and indicates delay condition code 3.
An exemplary subchannel status condition is an incorrect length condition, which occurs when the number of bytes contained in the storage area allocated for an I/O operation is not equal to the number of bytes requested or provided by the I/O device. When the FCX incorrect length indication function is not installed and an incorrect length condition is detected, processing of the transport mode channel program is terminated by a program check state. When the FCX incorrect length indication function is installed, the device supports incorrect length indication, does not suppress correct length indication, and detects an incorrect length condition, indicating an incorrect length based on one of the following reasons:
1) inputting a long block: during a read or detect operation, the device attempts to transfer one or more bytes to main storage after filling the allocated main storage area, or the device indicates that more data may be transferred if the count is larger. The extra number of bytes has not been placed in main storage. The count in the TSB (TSH) is 0.
2) Outputting a long block: during a write operation, the device requests one or more bytes from the channel subsystem after running out of allocated main storage area, or the device indicates that more data can be transferred if the count is larger. The count in TSH is 0.
3) Inputting a short block: the number of bytes transferred during a read or sense operation is insufficient to fill the main memory region allocated to the operation. The count in TSH is not 0.
4) Outputting a short block: the device terminates the writing before all the information contained in the allocated main storage area is transferred to the device. The count in TSH is not 0.
When the current DCW has the SLI flag set to 1, the incorrect length indication is suppressed. When TSH is meaningless, an incorrect length indication is also meaningless. The presence of an incorrect length condition suppresses the command chaining unless the SLI flag in the DCW is 1.
The subchannel extension status field is included in SCSW400 (e.g., located in bit positions 24-31 of word 2 of SCSW). When indicated in the subchannel status, this field may contain information that further explains the reason for any of the following conditions: interface control checking, channel data checking, program checking, and protection checking. If none of these bits are active in the subchannel status byte, the fields of the subchannel extension status do not contain any meaningful information. When more than one condition is indicated, the interface control checks take precedence over other conditions.
The subchannel extension status field may also include an inquiry failure (F) (e.g., on bit 24) operation bit. When set to 1, the F bit indicates that the query operation failed due to a program check, a channel control check, or an interface control check.
The subchannel extension status field may also include a Subchannel Extension Status Qualifier (SESQ) (e.g., bits 25-31). The subchannel status field may contain other information when the field indicates a program check, an interface control check, a channel subsystem retry failure, a protection check, a data check, or a channel control check. Exemplary SESQ values and their associated meanings are illustrated in FIGS. 18A-18B.
Fig. 19-20 illustrate an exemplary transport response IU330 that may be sent by the control unit 118. The transport response IU330 provides status of TCWI/O operations, which may include a normal end status, or a termination status indicating the cause of the abnormal termination of operations when an abnormal condition is detected. The transport response IU330 may also include an extended status field that provides further operating status. The transport response IU may or may not close the transport exchange. In one embodiment, whether the exchange is closed by a transport response IU is indicated in the FC-FS-3 header. If the transport exchange has not been closed by the transport response IU, the channel may send a transport acknowledgement IU closing the exchange after receiving the transport response IU.
In one embodiment, the transport response IU330 includes an SB-4 header 332 followed by a status field 334, a status LRC344, and an optional extended status field 346 containing, for example, from 32 to 46 bytes. When providing extended status, the 4-byte extended status LRC field 340 may be provided as the last word of the transport response IU 330. If the extended state byte count is not on a word boundary, a stuff byte is added to the extended state to round to the next word boundary. The SB-4 header 332 has a format similar to the transport command IU, and is set equal to the SB-4 header in the transport command IU for this exchange.
Referring now to FIG. 20, an embodiment of the status field 334 is, for example, 20 bytes and contains information about TCWI/O operations. The "status flag 1" field 336 includes one or more exception codes that are set by the control unit 118 to report exception conditions detected during a TCWI/O operation. Exemplary code includes:
0-device level exceptions caused by address exception conditions;
2-link level rejection caused by logical path non-establishment condition;
3-reset event notification-a reset event occurs on the logical path and on the device associated with the transport command IU. When this code is set in the transport response IU, the control unit requests a status confirmation of the status. Resetting a reset event condition on the device for the logical path if a status confirmation is received; otherwise the reset event condition remains pending;
4-program check/IFCC detected by the device-the control unit has detected a condition that may result in a reported program check or IFCC. Errors belonging to this class include the following types of errors: indicating that the transport command IU arrived in a corrupted state (e.g., TCCB integrity error), an invalid CRC is detected for the write data, and a second I/O operation is received for the logical path and device address that is not an inquiry operation.
5-program check detected by the device-the control unit detects an error in the content of the TCH
In one embodiment, the status flag 1 field 336 includes an Incorrect Length (IL) flag 338. Bit 0 is the Il flag when the channel and control unit supports the DCW incorrect length function, and when set to 1, should indicate that the DCW incorrect length condition indicated by the DCW offset resulted in termination of the TCWI/O operation. If the DCW data count does not match the amount of data required by the device for writing a DCW, or if the DCW count does not match the amount of data available on the device for reading a DCW, then the control unit 118 detects an incorrect length.
In one embodiment, if DCW202 includes SLI flag 214, IL flag 338 is set to 1 only when SLI flag 214 is 0 and when the device state includes a channel end state without a device check state. When the IL flag 338 is set to 1 in the transport response IU, the DCW offset identifies DCWs that contain incorrect length conditions, and the DCW remaining count indicates the amount of data transfer, which, if any, is transferred for the incorrect length DCW. Data transfer (if any) for DCWs that precede the incorrect length DCW in the TCA should be complete and all CRC checks for the transferred data should have been performed, as described below.
When the DCW containing the incorrect length condition is a read DCW, the last transfer data IU is sent to the channel INCLUDESCRC for all read data transferred to the channel during the TCWI/O operation. If the write DCWs precede the incorrect length read DCWs in the TCA, the data for these write DCWs should be received by the control unit and a CRC check should be performed on the data. The data of the write DCW in the TCA that follows the incorrect length read DCW should be transferred to the control unit as needed to obtain the CRC of the write data and perform a CRC check.
An incorrect length condition is not recognized by the interrogate command, transmit CRC offset command, or TTE command, whether or not the channel and control unit support an incorrect length function.
The transport response IU330 may also include a Data Length Remaining Count (DLRC) field 340. For write operations and bi-directional operations, the DL remaining count is a 32-bit unsigned binary integer that specifies the difference between the DL field in the transport command IU and the number of bytes actually received from the channel. For a read operation, the DL remaining count is a 32-bit unsigned binary integer that specifies the difference between the DL field in the transport command IU and the number of bytes actually sent to the channel.
For bi-directional operation, a BRDL remaining count field 342 is also included in the transport response IU 300. For bi-directional operation, the BRDL remaining count is a 32-bit unsigned binary integer that specifies the difference between the BRDL field in the transport command IU and the number of bytes actually sent to the channel.
The status flag 3 field 344 may be used by the control unit 118 to provide information regarding the associated transmission mode operation. This field may include an Extended Status Sent (ESS) bit to indicate that extended status including possible detection data has been sent by the transport response IU. The extended state includes Extended State (ES) flags that include fields such as ES type code fields. The type code includes an I/O status (the extended status field contains the valid end status of the transfer mode I/O operation), an I/O exception (the extended status field contains information about the termination of the transfer mode I/O operation due to an exception condition), and a query status (the extended status field contains the status of the query operation).
When the ES type code in the ES flag is an I/O exception, the ES includes a Reason Code (RC). Exemplary reason codes include:
1-TCCB integrity error: the control unit determines that the TCCB arrives in a corrupted state (provided when exception code 4 is indicated in the status flags 1 field);
2-detection of invalid CRC: an invalid CRC is detected on the received data (provided when exception code 4 is indicated in the status flag 1 field);
3-incorrect TCCB Length designation (provided when exception code 5 is indicated in the status flags 1 field);
4-TCAH specifies an error (provided when exception code 5 is indicated in the status flag 1 field);
5-DCW specifies error: there is an error where DCW is specified by the DCW offset field in extended state (provided when exception code 5 is indicated in the status flag 1 field);
6-transmission direction designation error: the command specified by DCW offset in extended state specifies a data transfer direction that is different from the transfer direction specified in TCH, or the R bit and W bit are both set to 1 in TCH and the control unit does not support bi-directional data transfer (provided when exception code 5 is indicated in status flag 1 field);
7-Transmission count specifies error (provided when exception code 5 is indicated in the status flags 1 field);
8-two I/O operations are active: while the I/O operation is active on the device, a second non-interrogating TCCB has been transmitted to the device for execution. The RCQ field has no meaning. The reason code is provided when exception code 4 is indicated in the status flag 1 field.
One or more entries in the 9-CRC offset block indicate that the intermediate CRC is not in a location suitable for the device and/or provide an executing command when exception code 4 is indicated in the status flags 1 field.
The extended state may also provide a Reason Code Qualifier (RCQ) that provides additional information about the cause of the I/O exception. Different reason code qualifier types may be used for different error types, such as TCCB integrity errors, output data CRC errors, incorrect TCCB length designations, TCAH designation errors, and DCW designation errors. An exemplary RCQ for TCCB integrity errors includes:
0-no other messages;
1-data count error-the amount of data transferred for the transfer command IU is not equal to the L1 field in the TCH of the control unit that does not support bidirectional operation plus the amount of data specified by 8, or is not equal to the L1 field of the control unit that does not support bidirectional operation plus the amount of data specified by 8 or 9; and
2LRC error-LRC on the transport command IU is invalid.
Exemplary RCQs specified by DCW include:
1-reserved field specifies error: the reserved field in the DCW required to contain 0 contains a non-zero value;
2-flags field Command Link specified error: the command chaining bit is 1 and the offset of the next DCW is such that part or all of the next DCW extends beyond the end of the TCA, or the command chaining bit is 0 and more than 3 unused bytes remain in the TCA;
3-control data count specifies error: CD count specifies control data beyond the end of TCA;
4-TCOBDCW location error: the first TCOBDCW is not a first DCW in the TCA;
5-TCOBDCW replication error: specifying more than 1 TCOBDCW in TCA;
6-TCOBDCW Multi-count specifies error: both the CD count and the DCW data count are 0 or non-zero;
7-TCOBDCW direction error: TCOBDCW is specified in TCA and the W bit in TCH is 0;
8-TCOBDCW chain error: the chain command bit in TCOBDCW is 0, i.e., TCOBDCW is only DCW in TCA;
9-TCOB count specifies error: TCOBDCW has a non-zero CD count or a data count that is not a multiple of 4;
10-TTEDCW position error: TCOBDCW is not specified and encounters a TTEDCW that is not the first DCW in the TCA, or TCOBDCW is specified and encounters a TTEDCW that is not the second DCW in the TCA;
11-TTEDCW replication error: more than 1 TTEDCW is encountered in TCA;
12-TTEDCWCCD count specifies error: the control data count in TTEDCW specifies a value other than 0;
13-TTEDCW data count specifies error: the data count in TTEDCW specifies a value that is less than 8 or not a multiple of 4;
14-TTEDCW directional error: TTEDCW is designated and the W bit in TCH is 0;
15-TTEDCW chain error: the chain command bit in TTEDCW is 0; and
16-TCAX specifies error: TTEDCW is specified and either:
the length of TCA is 58 words or less, or
The length of the TCA is 59 words, and the last DCW in the TCA specifies the control data and the length of the control data extended beyond 59 words, or
The maximum length of TCA is 60 words and the last word in TCA contains the first word of DCW.
An exemplary RCQ with transmission direction designation error includes:
1-read direction specified error: DCW specifies the input operation and the R bit in TCH is 0;
2-write direction specified error: DCW specifies the output operation and the W bit in TCH is 0. Note-when TCOB or TTEDCW is specified and the W bit in TCH is 0, DCW specification is identified;
3-read-write collision: the R bit and the W bit in the TCH are both 1 and the control unit does not support bidirectional operation, or the control unit supports bidirectional operation but the transport command IU does not contain a BRDL field, or the R bit and the W bit are not both 1 but the transport command IU contains a BRDL field;
exemplary RCQs for transmission count specified errors include:
1-read count specified error: for a read operation, the value specified by the DL field in the TCCB is not equal to the total data byte count specified by the DCW plus the padding bytes and CRC in the TCA; for bi-directional operation, the value specified by the BRDL field in the TCCB is not equal to the read DCW in TCA plus the total data byte count specified by the stuff bytes and CRC.
2-write count specifies error: the value specified by the DL field in the TCCB is not equal to the DCW in TCA plus the total data byte count specified by the intermediate stuff bytes, intermediate CRC, final stuff bytes, and final CRC bytes, which includes COB, any COB stuff bytes, and COBCRC bytes if COB is included in the first transfer data IU of the write data transfer. If TTEDCW is included in TCA, the count also includes TCAX and TCAXCRC bytes.
When the channel subsystem detects a design error, a program check is performed. For transfer mode operation, design errors may also be detected by the I/O device 116 and reported as program checks. The program inspection condition may be caused by any one of the following reasons:
invalid TCW specifies: identifying invalid TCW designations when any of the following conditions are detected:
the reserved field in the TCW checked for 0 does not contain 0.
2. A non-zero value is specified in the TCW format field.
And 3, both a read bit and a write bit in the TCW are 1, a bit 10 of a TCW mark field is 0, and the FCX bidirectional data transmission function is not installed or the designated equipment does not support bidirectional data transmission.
Bit 10 in the TCW flags field is 0 and the TCCB length field in the TCW specifies a length of less than 12 or greater than 244.
Bit 10 in the TCW flags field is 1 and the write operation (W) bit of the TCW is 0, the read operation (R) bit of the TCW is 0, or both.
Bit 10 in the TCW flags field is 1 and the specified subchannel is not associated with a control unit that has been configured to transmit fibre channel service requests.
When using TTEDCW, a program check to identify device detection when either of the following conditions exists:
1.TTEDCW is not the first DCW in TCA when TCOBDCW is not specified. TTEDCW is not the second DCW in TCA when TCOBDCW is specified.
2. TTEDCW is specified and no write operation is specified (i.e., the W bit in TCW is 0).
Chain command in TTEDCW is 0.
4. More than one TTEDCW is specified.
The control data count field in TTEDCW does not contain 0.
6. The count field contains a value less than 8 or a value that is not a multiple of 4.
7. For TCA, any of the following is true:
the TCA does not contain at least one DCW that is not a transport command DCW.
The TCA contains one or more DCWs that are not transport command DCWs and the chain command flag in the last DCW of the TCA is 0.
When TTEDCW is used and other TCMI and/or output data follows TCAX immediately, the following should be true; otherwise, the program check detected by the device can be identified:
the output-TIDA flag (flag bit 7) in TCW must be 1; or
When the TIDAW is used for transporting TCAX and for transporting data, the insertion CBC control must be set to 1 in or only in the last TIDAW used for transporting TCAX. When the TIDAW is used only for transporting TCAX, it is not necessary to set the insertion CBC in or only in the last TIDAW.
During processing of TCA, TCCB content errors can be identified when either of the following conditions is detected:
1. the first TCOBDCW encountered is not the first DCW in the TCA;
2. encountering a second TCOBDCW in TCA;
3. when the W bit in TCAH is 0, TCOBDCW is encountered in TCA;
TCOBDCW has no chain flag set;
5. a TCOBDCW is encountered, where both the CD count and the data count are 0;
6. a TCOBDCW is encountered, where both the CD count and the data count are non-zero values;
7. encountering TCOBDCW, where CD count is 0 and data count is not a multiple of 4;
8. encounter TCOBDCW, where the data count is 0 and the CD count is not a multiple of 4;
9. TCOBDCW is not specified and TTEDCW is not the first DCW in TCA, or TCOB is specified and TTEDCW is not the second DCW in TCA;
10. TTEDCW is encountered in TCA when the W bit in TCAH is 0;
TTEDCW unset chain flag;
12. encountering a second TTEDCW in the TCA;
13. TTEDCW is encountered in which the CD count is a non-zero value;
14. TTEDCW is encountered where the data count is 0 or not a multiple of 4;
15. TTEDCW is specified and either: TCA is 58 words or less in length; the length of TCA is 59 words, the last DCW in TCA specifies the control data and the control data length is extended beyond 59 words; or the maximum length of TCA is 60 words and the last word in TCA contains the first word of DCW;
DCW contains a command that requires control data and the CD count field is 0 or contains a value specifying data beyond the end of TCA;
DCW contains a non-zero CD count field and commands disallow provision of control data;
18. during a write operation, the device encounters a command in the TCA attempting to perform a read data transfer;
19. during a read operation, the device encounters a command in the TCA attempting to perform a write data transfer;
CC bit is 0 in DCW and more than 3 unused bytes remain in TCA;
the CC bit is 1 in DCW and the next DCW position is determined to be less than 8 bytes from the end of TCA, indicating that TCAX is not provided, or that TCAX has been provided but the next DCW position is determined to be less than 8 bytes from the end of TCAX;
22. for a read operation or a bi-directional operation, when a read DCW in the TCA becomes the current DCW, the sum of the data counts of all previous read DCWs and the current DCW plus all stuff bytes and CRC bytes exceed the DL field in the TCCB, or, for a bi-directional operation, exceed the BRDL field in the TCCB;
23. for a read operation or a bi-directional operation, when the last DCW in the TCA becomes the current DCW, the sum of the data counts of all read DCWs plus all pad bytes and CRC bytes is not equal to the DL field in the TCCB, or, for a bi-directional operation, is not equal to the BRDL field in the TCCB;
24. for a write operation or a bi-directional operation, when the DCW in the TCA becomes the current DCW, the sum of the data counts of all the write DCWs plus all the stuff bytes and CRC bytes (including all the intermediate stuff bytes and CRC bytes) and COB bytes, COB stuff bytes and COBCCRC bytes (if COB is included in the transport data IU) and TCAX bytes, TCAX stuff bytes and TCAXCRC bytes (if TCAX is present) exceed the DL field in the TCCB, or
25. For a write operation or a bi-directional operation, when the last DCW in the TCA becomes the current DCW, the sum of the data counts of all the write DCWs plus all the stuff bytes and CRC bytes (including all the intermediate stuff bytes and CRC bytes) and COB bytes, COB stuff bytes and COBCCRC bytes (if COB is included in the transport data IU) and the TCAX bytes, TCAX stuff bytes and TCAXCRC bytes (if TCAX is present) do not equal the DL field in the TCCB.
In one embodiment, a link between channel subsystem 114 and control unit 118 and/or device 116 is established prior to performing command mode or transport mode operations. Each channel 128 in an I/O system having a physical connection with one or more control units is referred to as an "N _ Port" which has a unique identifier ("N _ Port _ ID"). Likewise, each control unit 118 may also be referred to as an N _ Port, which has an associated N _ Port _ ID. The channel 128 and control unit 118 may each include a plurality of channel images or control unit images. Each N _ Port includes an address identifier that is specified during the initialization and execution of the login process. Explicit N _ Port login can be performed during the initialization process through an N _ Port Login (PLOG) extended link service. When an N _ Port performs an N _ Port login using another N _ Port, the N _ Port is considered to be logged in through the other N _ Port.
In one embodiment, link initialization between the channel subsystem and the control unit is performed using process login (PRLI) Extended Link Service (ELS). The general aspects of PRLIELS (including the format of PRLIELS requests and responses) are given in FC-LS-2, with specific settings for FC-SB-4 defined in the section below.
In a PRLI process, the PRLI enabled channel 128 sends a request to each control unit 118 according to its configuration, which also supports process entry ELS to determine whether the control unit 118 supports transport mode operation. In one embodiment, the PRLI request is sent during channel initialization prior to establishing the logical path, and may also be sent as a result of a process logout (PRLO). The PRLIELS is used to exchange process login service parameters between the channel 128 and the control unit 118. These parameters may be exchanged between the channel and the control unit via a PRLI request and a PRLI response.
The PRLI request includes a service parameter page that may include a type code field that identifies the FC-4 protocol (e.g., set to hex '1B' to indicate the SB-4 protocol). The FC-SB-4 flag (e.g., byte 3 of word 3 of the PRLI request page) includes one or more flags described below:
0-support transport mode. When bit 0 is set to 0, the channel does not support transmission mode operation. When bit 0 is set to 1, the channel supports transport mode operation.
1-Retention.
2-support DCW Incorrect Length (IL) function. For example, when the IL flag is active (e.g., when bit 2 is set to 1), the channel 128 supports DCWIL functionality. When bit 2 is set to 0, the channel 128 does not support DCWIL functionality. The DCWIL function includes support for a Suppress Length Indicator (SLI) flag 214 and an incorrect length flag 338. When the bit (bit 0) supporting the transmission mode is equal to 0, bit 2 should be set to 0.
5-support of bidirectional data transmission. When the bidirectional data transfer indicates active (e.g., bit 5 is set to 1), the lane 128 supports bidirectional data transfer. When bit 5 is set to 0, the lane does not support bidirectional data transfer. A bit that supports the transmission mode is only meaningful if it is equal to 1.
7-support disabling the first transfer ready operation. When bit 7 is set to 1, the channel supports disabling the first transfer ready operation. When bit 7 is set to 0, the channel does not support disabling the first transfer ready operation. When the bit (bit 0) supporting the transmission mode is equal to 0, bit 7 should be set to 0.
In one embodiment, the PRLI response includes a PRLI Accept service parameter page, which may include a type code field that identifies the FC-4 protocol (e.g., set to hex '1B' to indicate the SB-4 protocol), and the FC-SB-4 flag (e.g., byte 3 of word 3) includes one or more defined flags described below:
0-support transport mode. When bit 0 is set to 0, control unit 118 does not support transmission mode operation. When bit 0 is set to 1, control unit 118 supports transmission mode operation.
2-support DCW Incorrect Length (IL) function. When bit 2 is set to 1, control unit 118 supports the DCWIL function. When bit 2 is set to 0, control unit 118 does not support the DCWIL function. The DCW incorrect length function includes support SLI flag 214 and incorrect length flag 338. When the bit (bit 0) supporting the transmission mode is equal to 0, bit 2 should be set to 0.
5-support of bidirectional data transmission. When the bidirectional data transfer indicates an active state (e.g., bit 5 is set to 1), the control unit 118 supports bidirectional data transfer. When bit 5 is set to 0, control unit 118 does not support bi-directional data transfer. A bit that supports the transmission mode is only meaningful if it is equal to 1.
7-support disabling the first transfer ready operation. When bit 7 is set to 1, the control unit supports disabling the first transfer ready operation. When bit 7 is set to 0, the control unit does not support disabling the first transfer ready operation. When the bit (bit 0) supporting the transmission mode is equal to 0, bit 7 should be set to 0.
Technical effects and advantages of exemplary embodiments include the ability to transmit transfer support data, as well as other commands, to a control unit in addition to I/O commands and device support data located in a TCCB. Technical effects also include the ability to continue processing DCWs regardless of whether an incorrect length condition is detected, thus allowing the control unit to continue processing I/O commands without terminating the I/O operation. Other technical effects include the ability to simultaneously transfer input and output data between a channel and a control unit during a single I/O operation.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system. Furthermore, various aspects of the invention may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied in the medium.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flow chart shown here is just an example. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention.
While the preferred embodiment to the invention has been described, it will be understood that those skilled in the art, both now and in the future, may make various improvements and enhancements which fall within the scope of the claims which follow. These claims should be construed to maintain the proper protection for the invention first described.
Claims (14)
1. An apparatus for performing an input/output (I/O) operation initiated by an I/O operation instruction on a host computer system configured to communicate with a control unit, the control unit in communication with one or more devices, the host computer system configured to perform:
generating, by a channel subsystem of the host computer system, at least one command message specifying an I/O operation, the at least one command message includes one or more Device Command Words (DCWs), each DCW associated with an I/O command, wherein at least one DCW of the one or more DCWs comprises a data count and a suppress-length indication (SLI), the SLI is configured to indicate whether the control unit continues to perform the I/O operation in response to the control unit detecting an incorrect length condition, the incorrect length condition is detected in response to the data count not matching an amount of data required to execute the I/O operation command, wherein the required data is one of data available on the control unit for a read operation command and data required by the control unit for a write operation command;
forwarding the at least one command message to the control unit;
receiving an incorrect length IL value from the control unit, the IL value being a first IL value in response to the SLI being a first SLI value and the data count not matching the required amount of data, the IL value being a second IL value in response to the SLI being a second SLI value and the data count matching the required amount of data; and
in response to receiving the IL value from the control unit, storing an IL indicator in a subchannel status word, the IL indicator representing the IL value.
2. The apparatus of claim 1, wherein the at least one DCW comprises a command chaining flag indicating that a subsequent DCW is logically connected to the at least one DCW and is executed by the control unit after the control unit executes the at least one DCW, and the SLI instructs the control unit to continue command chaining and execute the subsequent DCW in response to the control unit detecting the incorrect length condition.
3. The apparatus of claim 1, wherein the SLI is a value in a SLI field in the at least one DCW, the value of 1 indicating the control unit continues the I/O operation when the incorrect length condition is detected, the value of 0 indicating the control unit terminates the I/O operation when the incorrect length condition is detected.
4. The apparatus of claim 3, wherein the SLI field comprises a value of 1, the at least one DCW is a read DCW, and the apparatus is configured to perform:
receiving, at the channel subsystem, a data volume in a data transfer from the control unit in response to a command chaining flag indicating that command chaining is used for the read DCW and the data count value is greater than an available data volume on the device, the data transfer including one or more stuff bytes located in the data transfer such that the data volume for the DCW transfer is equal to the data count value;
in response to the command link flag indicating that command link is not used for the read DCW and the data count value is greater than an amount of data available on the device, receiving only the amount of data or an amount of data having one or more stuff bytes such that the amount of data transferred for the DCW is equal to the data count value; and
in response to the data count value being less than an amount of data available on the device, receiving an amount of data on the channel subsystem equal to the data count value.
5. The apparatus of claim 3, wherein the SLI field comprises a value of 1, the at least one DCW is a write DCW, and the apparatus is configured to perform:
in response to a command chaining flag indicating that command chaining is used for the write DCW and the data count value is greater than the amount of data required by the device, transmitting, by the channel subsystem, an amount of data equal to the amount of data required by the device to the control unit and discarding remaining data;
in response to the command link flag indicating that command link is not used for the write DCW and the data count value is greater than the amount of data required by the device, transmitting the amount of data required by the device and transmitting additional data until the data count value is exhausted; and
in response to the data count value being less than the amount of data required by the device, transmitting an amount of data equal to the count value to the control unit.
6. The apparatus of claim 1, wherein the at least one DCW comprises an SLI that includes an SLI field, the SLI field having a value of 1 in response to the SLI being a second SLI value, a value of 0 in response to the SLI being the first SLI value, the channel subsystem is configured to receive a transfer response message returned from the control unit in response to performing or terminating the I/O operation, the transfer response message including an IL value located in an incorrect length IL field, this field indicates whether the I/O operation is terminated because of the incorrect length condition, in response to the SLI being the first SLI value and the data count not matching the amount of data needed, the IL field has a value of 1, the IL field having a value of 0 in response to at least one of the SLIs being the second SLI value and a data count matching a required amount of data.
7. The apparatus of claim 6, wherein the transfer response message includes a DCW offset field that indicates which of a plurality of DCWs caused the incorrect length condition to be detected.
8. The apparatus of claim 1, wherein the channel subsystem is configured to perform:
sending a process login request message to the control unit, the process login request message configured to initialize a link between the channel subsystem and the control unit, the process login request message including a header having a value indicating whether the channel subsystem supports using the SLI; and
receiving a process login response message from the control unit, the process login response message including a header having a value indicating whether the control unit supports using the SLI.
9. A method for performing an input/output, I/O, operation initiated by an I/O operation instruction on a host computer system configured to communicate with a control unit, the control unit in communication with one or more devices, the method comprising:
generating, by a channel subsystem of the host computer system, at least one command message specifying an I/O operation, the at least one command message includes one or more device command words, DCWs, each DCW associated with an I/O command, wherein at least one DCW of the one or more DCWs comprises a data count and a suppress-length indication (SLI), the SLI is configured to indicate whether the control unit continues to perform the I/O operation in response to the control unit detecting an incorrect length condition, the incorrect length condition is detected in response to the data count not matching an amount of data required to execute the I/O operation command, wherein the required data is one of data available on the control unit for a read operation command and data required by the control unit for a write operation command;
forwarding the at least one command message to the control unit;
receiving an incorrect length IL value from the control unit, the IL value being a first IL value in response to the SLI being a first SLI value and the data count not matching the required amount of data, the IL value being a second IL value in response to the SLI being a second SLI value and the data count matching the required amount of data; and
in response to receiving the IL value from the control unit, storing an IL indicator in a subchannel status word, the IL indicator representing the IL value.
10. The method of claim 9, wherein the at least one DCW includes a command chaining flag indicating that a subsequent DCW is logically connected to the at least one DCW and is executed by the control unit after the control unit executes the at least one DCW, and the SLI instructs the control unit to continue command chaining and execute the subsequent DCW in response to the control unit detecting the incorrect length condition.
11. The method of claim 9, wherein said SLI is a value in a SLI field in said at least one DCW, said value of 1 indicating that said control unit continues said I/O operation when said incorrect length condition is detected, said value of 0 indicating that said control unit terminates said I/O operation when said incorrect length condition is detected.
12. The method of claim 9, wherein the at least one DCW comprises an SLI that includes an SLI field, the SLI field having a value of 1 in response to the SLI being a second SLI value, a value of 0 in response to the SLI being the first SLI value, the channel subsystem is configured to receive a transfer response message returned from the control unit in response to performing or terminating the I/O operation, the transfer response message including an IL value located in an incorrect length IL field, this field indicates whether the I/O operation is terminated because of the incorrect length condition, in response to the SLI being the first SLI value and the data count not matching the amount of data needed, the IL field has a value of 1, the IL field having a value of 0 in response to at least one of the SLIs being the second SLI value and a data count matching a required amount of data.
13. The method of claim 12, wherein the transfer response message includes a DCW offset field that indicates which of a plurality of DCWs caused the incorrect length condition to be detected.
14. The method of claim 9, further comprising:
sending a process login request message to the control unit, the process login request message configured to initialize a link between the channel subsystem and the control unit, the process login request message including a header having a value indicating whether the channel subsystem supports using the SLI; and
receiving a process login response message from the control unit, the process login response message including a header having a value indicating whether the control unit supports using the SLI.
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US13/173,754 US8473641B2 (en) | 2011-06-30 | 2011-06-30 | Facilitating transport mode input/output operations between a channel subsystem and input/output devices |
| US13/173,754 | 2011-06-30 | ||
| PCT/EP2012/058104 WO2013000603A1 (en) | 2011-06-30 | 2012-05-03 | Facilitating transport mode input/output operations between a channel subsystem and input/output devices |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1193884A1 HK1193884A1 (en) | 2014-10-03 |
| HK1193884B true HK1193884B (en) | 2017-03-03 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8095847B2 (en) | Exception condition handling at a channel subsystem in an I/O processing system | |
| US20120311390A1 (en) | Fibre channel input/output data routing system and method | |
| US20120311287A1 (en) | Fibre channel input/output data routing system and method | |
| US8631175B2 (en) | Facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| US8549185B2 (en) | Facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| US20120311200A1 (en) | Fibre channel input/output data routing system and method | |
| CN103597458B (en) | Method and apparatus for input/output processing | |
| AU2012278225B2 (en) | Facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| HK1193884B (en) | Facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| HK1193885A (en) | Apparatus and method for facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| HK1193885B (en) | Apparatus and method for facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| KR101476073B1 (en) | Facilitating transport mode input/output operations between a channel subsystem and input/output devices | |
| KR101476075B1 (en) | Facilitating transport mode input/output operations between a channel subsystem and input/output devices |