The symbols used in the flows that follow are:
- R = Read
- P = PREPARE
- W = Write
- S = Sense
- C = Control
- TO = Time Out
- cc = Command Chain
- When a DLE ENQ for PREPARE resume receives a negative acknowledge,
the condition is treated as a NAK to a NAK in normal processing. In
this case, the last non-NAK is defined to be the last buffer (null
or not) for which an acknowledgement has not been received. This buffer
will be different depending on which side starts the PREPARE and which
receives the NAK. The following example illustrates the different
interpretations.
Note: In the example, an actual buffer
is sent in all cases where just the BCB is shown.
Figure 1. BSC Error Protocols
- In the case of a wake up contention condition on a BSC line, one
DLE ENQ may be lost. This situation is resolved by using the primary/secondary
relationship between the nodes (established at signon) to determine
which side sends data first.
If one side receives a unit exception
when it tries to write the DLE ENQ, that side uses the primary/secondary
relationship in the same way as above after issuing a read skip to
clear the contention.
If one side receives DLE ENQ instead of
data in response to its DLE ENQ, then that side waits (issues a read
CCW) for DLE STX data buffer DLE ETB to be transmitted if it is the
secondary, or sends DLE STX data buffer DLE ETB if it is the primary.
The flow for contention is:
- If one side goes down while I/O is suspended, the other side will
detect it at resume time by a timeout as follows:
When the read times out in this case, normal time-out processing
should be used. This includes sending a NAK.
- If one side restarts while I/O is suspended, the following scenario
will occur:
If the restart occurs at the same time as a resume, the following
can happen:
Note: If both sides try to restart while I/O is
suspended, the signon contention protocol will resolve contention
problems.
- A system that has not agreed to use PREPARE at signon time should
never receive DLE ENQ. However, if such a sequence is ever received
unexpectedly, the proper procedure is to respond to it with a NAK.
- If the resuming side sends DLE ENQ and the sequence is lost (due
to a hardware error), a timeout will occur and that side should send
a NAK (following normal timeout recovery).
- Note that the only valid sequences read by the READ chained to
a PREPARE CCW are DLE ENQ, SOH ENQ, or NAK. All these cases have been
covered in the preceding examples. The “resumer” never immediately
sends a null or non-null data buffer, nor is there any way such a
buffer can be received until normal sequences are used.
- The following flow shows what happens when side A requests I/O
suspension and side B does not want to enter this state because it
has something to send.
- Either side may continue to request suspension, even if the other
side does not agree to it.