Programming Note
The count field in the CSW associated
with an operation terminated by HALT 1/0 or HALT DEVICE is unpredictable.
Termination CLEAR 1/0 The termination of an operation by CLEAR 1/0 causes the subchannel to be set to
the available state and causes a CSW to
be stored. The validity of the CSW fields is defined in the instruction CLEAR 1/0 earlier in this chapter.
When the CLRIO function terminates an
operation at a subchannel in the
interruption-pending state, up to three
subsequent interruption conditions
related to the operation can occur.
Since the CLRIO function causes the
subchannel to be made available, these
interruption conditions will result in
only the status portion of the CSW being
indicated.
The first interruption condition arises
when channel end is signaled to a selec­
tor or block-multiplexer channel. This
occurs only when the interruption­
pending state of the subchannel at the
execution of CLEAR 1/0 is due to the
previous execution of HALT 1/0 or HALT DEVICE. The second and third interruption condi­
tions arise when control-unit end, if
any, and device end are signaled to the
channel.
When the ClRIO function terminates an
operation at a subchannel in the working
state, up to four subsequent inter­
ruption conditions related to the opera­
tion can occur. For all of these
conditions, only the status portion of
the CSW is indicated.
The first interruption condition arises
on certain channels when the terminated
operation was in the midst of data
transfer. Since the device is not
signaled to terminate the operation
during the execution of the ClRIO func­
tion unless the channel is working with
the addressed device when the instruc­
tion is received, the device may,
subsequent to execution of the CLRIO function, attempt to continue the data
transfer. The channel responds by
signaling the device to terminate 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 condition. Only channel status, and an all-zero
unit status, is indicated in the CSW. A second interruption condition may
occur if channel-end status is received
from the device. The third and fourth
conditions may occur if control-unit
end, andlor device end are presented to
the channel. In these three cases, only
unit status is indicated in the CSW, unless an error is detected by the chan­
nel.
When a pending 1/0 operation is termi­
nated by the CLRIO function, the CSW stored contains the address of the first CCW, plus 8, in the command-address
field; either zeros, if the channel has
not attempted to initiate the operation
at the device, or the last status
received from the device in the unit­
status field; zeros in the channel­
status field; and the deferred condition
code is 1. If the unit status is not
zeros, the busy bit is included.
When CLEAR 1/0 is issued to a device
having a suspended channel-program
execution, the suspended channel-program
execution is terminated, condition code
1 is set, and a CSW is stored with zeros
in the unit-status field and channel­
status field. The command-address field
contains the address of the CCW having
the S flag, plus 8.
Termination CLEAR CHANNEL When CLEAR CHANNEL is issued, I/O-system reset is performed in the addressed
channel, and system reset is signaled to
all 1/0 devices attached to that
channel. I/O-system reset causes the
channel to conclude operations in all
subchannels. Status information and all
interruption conditions in all subchan­
nels are reset, and all operational
subchannels are placed in the available
state.
Termination Due to Equipment Malfunction
When channel-equipment malfunctioning is
detected or invalid signals are received
from a device, the recovery procedure
and the subsequent states of the
subchannels 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 1/0 inter­
ruption condition, and the associated CSW indicates channel-control check or
interface-control check. However, when
the nature of the malfunction prevents
generation of an 1/0 interruption condi­
tion, a machine-check interruption
condition is created, and a CSW is not
stored. A malfunction may cause the
channel to perform I/O selective reset
or generate the halt signal. Chapter 13. Input/Output Operations 13-59
Signaling of the halt signal, I/O selec­
tive reset, or system reset causes
channel-program execution, if any, to be
terminated at the affected subchannels.
In any termination of a suspended
channel-program execution that causes an
interruption condition to be recognized,
suspension is canceled at the subchannel
and the command-address field of the CSW stored when the interruption condition
is cleared contains the address of the
current (suspended) CCW, plus 8.
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. The conditions are
indicated in an associated CSW which is
stored at the time of interruption.
These conditions can be caused by the
program or by an external event at the
device.
Interruption Conditions
A request for an I/O interruption is
called an I/O-interruption condition,
or, in this chapter, simply an inter­
ruption condition.
An interruption condition can be brought
to the attention of the program only
once and is cleared when it causes an
interruption. Alternatively, an inter­
ruption condition can be cleared by
I/O-system reset, I/O selective reset,
TEST I/O, or CLEAR I/O, and conditions
generated by the I/O device following
the termination of an operation at the
subchannel can also be cleared by START I/O or START I/O FAST RELEASE. The
latter include interruption conditions
caused by attention, device end, and
control-unit end, and channel end when
provided by a device after conclusion of
an operation at the subchannel.
The device attempts to initiate a
request to the channel for an I/O inter­
ruption whenever it detects any of the
following:
Channel end
Control-unit end
Device end
Attention
The channel combines the above status
with information in the subchannel and
either creates an interruption
condition, attempts command retry, or
continues command chaining as a function
of the received status. When command
chaining or command retry takes place,
channel end and device end do not create 13-60 System/370 Principles of Operation
an interruption condition and are not
made available to the program.
The channel creates an interruption
condition when any of the following
conditions occurs during command chain­
ing:
Unit check (except when command
retry occurs)
Unit exception
Busy indication from device or
control unit
Program check
Protection check When an operation initiated by command
chaining is terminated because of an
unusual situation detected during the
command initiation sequence, the inter­
ruption condition may remain pending
within the channel, or the channel may
create an interruption condition at the
device. This interruption condition is
created at the device only 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 situ­
ation is detected by the device (unit
check or unit exception) the unit-status
field of the associated CSW identifies
the condition. If the unusual situation
is detected by the channel, as in the
case of program and protection check,
the identification of the error is
preserved in the subchannel and appears
in the channel-status field of the asso­
ciated CSW.
An interruption condition caused by the
device may be accompanied by channel and
other unit status. Furthermore, more
than one condition associated with the
same device can be cleared at the same
time. As an example, when channel end
is not cleared at the device by the time
device end is generated, both may be
indicated in the CSW and cleared at the
device concurrently.
However, either prior to or at the time
the channel assigns highest priority for
interruptions to an interruption condi­
tion associated with an operation at the
subchannel, the channel accepts the
status from the device and clears the
condition at the device. The inter­
ruption condition and the associated
status indication are subsequently
preserved in the subchannel. Any subse­
quent status generated by the device is
not included when the CSW is stored,
even if the status is generated before
the interruption condition is cleared.
When the channel is not working, a
device that is interruption-pending may
attempt to initiate a request to the
channel for an I/O interruption by
presenting a nonzero status byte to the
channel. Depending on the channel, some
Previous Page Next Page