channel-end condition. The selector channel handles
this condition as any other interruption condition
from the device after the device has been discon­
nected from the channel, and provides zeros in the
protection key, command address, count, and chan­
nel status fields of the associated CSW. The
channei-end. condition is not made available to the
program when HALT I/O or HALT DEVICE is
issued to a channel executing a chain of operations
and the device has already provided channel end for
the current operation.
Finally, the third and fourth interruption condi­
tions occur when control unit end, if any, and device
end are generated. These conditions are handled as
for any other I/O operation.
The termination of an operation by HALT I/O or
HALT DEVICE on a multiplexer channel causes the
normal interruption conditions to be generated. If
the instruction is issued when the subchannel is in
the data-transfer portion of an operation, the stib­ channel remains in the working state until channel
end is signaled by the device, at which time the sub­
channel is placed in the interruption-pending state. If
HALT I/O or HALT DEVICE is issued after the
device has signaled channel end and the sub channel
is executing a chain of operations, the channel-end
condition is not made available to the program, and
the sub channel remains in the working state until the
next status byte from the device is received. Receipt
of a status byte subsequently places the sub channel
in the interruption-pending state.
The CSW associated with the interruption condi­
tion in the subchannel contains the status byte pro­
vided by the device and the channel, and indicates at
what point data transfer was terminated. If HALT I/O or HALT DEVICE is issued before all data
areas associated with the current operation have
been exhausted or filled, incorrect length is indicat­
ed, subject to the control of the SLI flag in the cur­
rent CCW. The interruption condition is processed
as for any other type of termination.
The termination of a burst operation by HALT I/O or HALT DEVICE on a block-multiplexer
channel may, depending on the model and the type
of subchannel, take place as for a selector channel or
may allow the subchannel to remain in the working
state until the device provides ending status.
Programming Note
The count field in the CSW associated with an oper­
ation terminated by HALT I/O or HALT DEVICE
is unpredictable.
Termination by CLEAR I/O The termination of an operation by CLEAR I/O causes the subchannel information pertaining to tbe
current operation, if any, with the addressed device
to be stored in the CSW and the subchannel to be.
set to the available state. Unless a channel check had
been detected prior to the execution of CLEAR I/O or occurs during the execution of CLEAR I/O, the
contents of the CSW indicate the point at which tpe channel program was terminated. The count field.
and the incorrect length indication are, however,
unpredictable.
When CLEAR I/O terminates an operation at. a
sub channel in the interruption-pending state, up to
three subsequent interruption conditions related to
the operation can occur. Since CLEAR I/O causes
the sub channel to be made available, these interrup­ tion conditions will result in only the unit-status por­
tion of the CSW being stored.
The first interruption condition arises on a selec­
tor channel when channel-end status is presented to
the channel. This occurs only when the interruption­
pending status of the channel and subchannel at the
execution of CLEAR I/O were due to the previous
execution of HALT I/O or HALT DEVICE.
The second and third interruption conditions arise
when control unit end, if any, and device end are
presented to the channel.
When CLEAR I/O terminates an operation at a
sub channel in the working state, up to four subse­
quent interruption conditions related to the opera­
tion can occur. For all of these conditions, only the
status portion of the CSW will be stored.
The first interruption condition arises on certain
channels when the terminated operation was in the
midst of data transfer. Since the device is not sig­
naled to terminate the operation during the execu­
tion of CLEAR I/O unless the channel is working
with the addressed device when the instruction is
received, the device may, subsequent to the CLEAR I/O, attempt to continue the data transfer. The
channel responds by signaling the device to termi­
nate data transfer. Depending on the channel, the
need to signal the device to terminate data transfer
may be ignored or may be considered an interface
control check which creates an interruption condi­
tion. Only channel status is stored in the CSW.
The second interruption condition occurs when
channel-end status is received from the device. The
third and fourth conditions occur when control unit
end, if any, and device end are presented to the
channel. In these three cases, only unit status is
stored in the CSW.
Input/Output Operations 225
Tennimlltion Due to Equipment Malfunction
When channel equipment malfunctioning is detected
or invalid signals are received over the I/O interface,
the recovery procedure and the subsequent states of
the subehannels and devices on the channel depend
on the type of error and on the model. Normally, the
program is alerted to the termination by an I/O in­
terruption, and the associated CSW indicates the
channel-control-check or interface-control-check
condition. In channels sharing common equipment
with the CPU, malfunctioning detected by the chan­
nel may be indicated by a machine-check interrup­
tion, in which case no CSW is stored. Equipment
malfunctioning may cause the channel to perform
the I/O·-selective-reset or I/O-system-reset function
or to generate the halt signal.
Input/Output Interruptions
Input/ output interruptions provide a means for the CPU to change its state in response to conditions
that occur in I/O devices or channels. These condi­
tions can be caused by the program or by an external
event at the device.
Interruption Conditions
The conditions causing requests for I/O interrup­
tions to be initiated are called I/O interruption con­
ditions. An I/O interruption condition can be
brought to the attention of the program only once
and is cleared when it causes an interruption. Alter­
natively, an I/O interruption condition can be
cleared by TEST I/O or CLEAR I/O, and condi­
tions gellerated by the I/O device following the ter­
mination of the operation at the subchannel can be
cleared by ST ART I/O or START I/O FAST RE­
LEASE. The latter include the attention, device­
end, and control-unit-end conditions, and the channel-end condition when provided by a device
after concluding of the operation.
The device attempts to initiate a request to the
channel for an interruption whenever it detects any
of the folllowing conditions:
Channel end
Control-unit end
Device end
Attention
The channel may also, at command chaining, cre­
ate an interruption condition at the device, which
can be due to the following conditions: Unit check
Unit exception
Busy indication from device Program check
Protection check
226 System/370 Principles of Operation
When an operation initiated by command chain­
ing is terminated because of an unusual condition
detected during the command initiation sequence,
the interruption condition may remain pending with­
in the channel, or the channel may create an inter­
ruption condition at the device. An interruption
condition is created at the device in response to
presentation of status by the device and causes the
device subsequently to present the same status for
interruption purposes. The interruption condition at
the device mayor may not be associated with unit
status. If the unusual condition is detected by the
device (unit check or unit exception) the unit-status
field of the associated CSW identifies the condition.
In the case of program and protection check, the
identification of the error condition is preserved in
the subchannel, and appears in the channel-status
field of the associated CSW. If the associated inter­
ruption condition has been queued at the device, the
device provides zero status for interruption purposes.
When command chaining takes place, channel end
and device end do not cause an interruption, and are
not made available.
An interruption condition caused by the device
may be accompanied by channel and other unit sta­
tus conditions. Furthermore, more than one inter­
ruption condition associated with the same device
can be cleared at the same time. As an example,
when the channel-end condition is not cleared at the
device by the time device end is generated, both
conditions may be indicated in the CSW and cleared
at the device concurrently.
However, at the time the channel assigns highest
priority for interruptions to a condition associated
with an operation at the subchannel, the channel
accepts the status from the device and clears the
condition at the device. The interruption condition
and the associated status indication are subsequently
preserved in the subchannel. Any subsequent status
generated by the device is not included with the con­
dition at the sub channel, even if the status is gener­
ated before the CPU accepts the condition.
The method of processing a request for interrup­
tion due to equipment malfunctioning depends on
the model. In channels sharing common equipment
with the CPU, malfunctioning detected by the chan­
nel may be indicated by causing a machine-check
interruption.
When the channel detects any of the following
conditions, it initiates a request for an I/O interrup­
tion without necessarily communicating with or hav­
ing received the status byte from the device: PCI flag in a CCW Execution of HALT I/O or HALT DEVICE on
a selector channel
Previous Page Next Page