A I Channel A H
Subchannel
o +++
A Available
I Interruption pending I* = Interruption pending for a device other than the one
addressed In = Interruption pending for the addressed device W Working W* = Working with a device other than the one addressed wn = Working with the addressed device
H Hot operational * CSW stored
+ In the W*AX, W*I*X, and W*W*X states, a condition code 0 or
2 may be set, depending on the channel.
++ In the W*Inx, WtwnX, (with the CSW stored)
channel.
and wnxx states, a condition
or 2 may be set, depending
code 1
on the
+++ In the W*HX state, a condition code 2 or 3 may be set, depending on the channel.
Hote: Underscored codes pertain to situations that can occur
only on the multiplexer channel. Condition Codes Set by CLEAR I/O Programming Hotes
1. Since some channels cause condition
code 2 to be set when the instruc­
tion is received and the channel is
working, it may be useful to issue
a halt instruction and then CLEAR I/O to the desired address. Using
HALT DEVICE will ensure that condi­
tion code 2 is received on the CLEAR I/O only when the channel is
working with a device other than
the one addressed. Using HALT I/O will ensure that the current work­ ing state, if any, is terminated
without regard for the address.
2. Because of the inability of CLEAR I/O to terminate operations on some
channels when in the working state,
the instruction is not a suitable
substitute for HALT I/O or HALT DEVICE. 3. The combination of HALT DEVICE followed by CLEAR I/O can be used
to clear out all activity on a
channel by executing the two
instructions for all device
addresses on the channel.
4. The subchannel is said to be work­
ing with a device from the time
condition code 0 is set for SIO or SIOF addressed to the device until
the subchannel becomes
interruption-pending because of the
ending at the subchannel of the I/O operation or chain of operations.
Suspension of the channel-program
execution does not cause the ending
at the subchannel of an I/O opera­
tion or chain of operations.
Therefore, the subchannel is said
to be working even while the
channel-program execution is
suspended.
HALT DEVICE HDV [5]
'9E01'
o 16 20 31
The current I/O operation at the
addressed I/O device is terminated. The
subsequent state of the subchannel
depends on the type of channel.
Bits 8-14 of the instruction are
ignored. Bits 16-31 of the second­
operand address identify the channel,
the subchannel, and the I/O device to
which the instruction applies.
Either a HALT DEVICE (HDV) or a HALT I/O (HIO) function is performed, depending
on the channel. The HIO function is
performed when the HDV function is not
implemented by the channel. Chapter 13. Input/Output Operations 13-19
The HIO function is described in the
definition of the HALT I/O instruction.
The HDV function is described below.
If the subchannel is in the working
state and an I/O operation is pending or
suspended at the subchannel for the
addressed device, the channel appears
busy and condition code 2 is set.
Subsequently, when conditions allow, the
device is selected and issued the halt
signal.
If condition code 2 is set for HALT DEVICE as described above and the I/O operation has not been initiated at the
device by the time the halt signal is
issued, the I/O operation is terminated
and an interruption condition is recog­
nized. The unit-status field of CSW stored when the interruption condition
is cleared contains either the last
status received from the device when the
channel attempted to initiate the pend­
ing operation at the device, or zeros if
the channel has not attempted to initi­
ate the operation. The command-address
field contains the address of the first
or suspended CCW plus 8, and the
deferred condition code is 1.
If condition code 2 is set when HALT DEVICE is executed as described above
but the pending or suspended operation is terminated by the device before the
halt signal is issued, the channel
recognizes an interruption condition
because of the termination. Deferred
condition code 1 is indicated in the CSW stored when the interruption condition
is cleared. The halt signal mayor may
not be issued in this case.
If condition code 2 is set when HALT DEVICE is executed as described above
and the pending I/O operation has been
initiated at the device by the time the
halt signal is issued, the subchannel
remains working with the device and
termination of the operation occurs as a
function of status received from the
device.
If condition code 2 is set when HALT DEVICE is executed as described above
and the I/O operation has not been
initiated and the device is detected to
be not operational either prior to or
during the attempt to issue the halt
signal, the I/O operation is terminated,
and an interruption condition is recog­
nized. Deferred condition code 3 is
indicated in the CSW stored when the
interruption condition is cleared, and
the unit-status field contains zeros.
If condition code 2 is set when HALT DEVICE is executed as described above
and the channel accepts status from the
device before the pending I/O operation
is initiated at the device and before
the halt signal is issued, the operation
is terminated, and an interruption
condition is recognized. Deferred 13-20 System/370 Principles of Operation
condition code 1 is indicated in the CSW stored when the interruption condition
is cleared. The status that caused the
channel to terminate the operation is
indicated in the unit-status field of
the CSW, with the busy bit included.
The halt signal mayor may not be issued
in this case.
When the channel is either available or
interruption-pending, with the subchan­
nel available or working with an I/O operation in progress at the addressed
device, HALT DEVICE causes the addressed
device to be selected and to be signaled
to terminate the current operation, if
any. If the subchannel is available,
the subchannel is not affected. If, on
a byte-multiplexer channel, the subchan­
nel is working with an I/O operation in
progress at the addressed device, data
transfer is immediately terminated, but
the subchannel remains in the working
state until the device with which it is
working provides the next status byte,
whereupon the subchannel is placed in
the interruption-pending state.
When the channel is either available or
interruption-pending with the subchannel
either working with a device other than
the one addressed or interruption­
pending, no action is taken.
When the channel is working in burst
mode with the addressed device, data
transfer for the operation is immediate­
ly terminated, and the device immediate­
ly disconnects from the channel. If
command chaining or command retry is in
progress for the I/O operation using the
subchannel, it is suppressed.
When the channel is working in burst
mode with a device other than the one
addressed, and the subchannel is avail­
able, interruption-pending, or working
with a device other than the one
addressed, no action is taken. If the
subchannel is working with an I/O opera­
tion in progress at the addressed
device, the subchannel is set up to
signal termination of the device opera­
tion the next time the device requests
or offers a byte of data, if any. If
command chaining or command retry is
indicated for the I/O operation using
the subchannel, it is suppressed.
When the channel is working in burst
mode with a device other than the one
addressed and the subchannel is not
operational, is interruption-pending, or
is working with a device other than the
one addressed, the resulting condition
code may, in some channels, be deter­
mined by the subchannel state.
Termination of a burst operation by HALT DEVICE on a selector channel causes the
channel and subchannel to be placed in
the interruption-pending state. Gener­
ation of the interruption condition is
not contingent on the receipt of status
Previous Page Next Page