[comp.periphs.scsi] What's a poor target to do?

bjstaff@zds-ux.UUCP (Brad Staff) (07/06/90)

Imagine for a moment, if you will, the following:
1.  The target signals a 'data in' phase.
2.  The initiator detects a parity error in the data, and asserts ATN.
3.  The target notices that ATN is asserted, and signals a 'message out' phase.
4.  The initiator sends an 'initiator detected error' message.
5.  The target detects a parity error in the message.

What's the poor target to do?  I can't find anything in the SCSI-1 spec that
addresses this situation.  Perhaps the SCSI-2 spec does address this situation?

-- 
Brad Staff
Zenith Data Systems
616-982-5791
bjstaff@zds-ux.zds.com

mjacob@wonky.Eng.Sun.COM (Matt Jacob) (07/06/90)

In article <363@zds-ux.UUCP> bjstaff@zds-ux.UUCP (Brad Staff) writes:
>Imagine for a moment, if you will, the following:
>1.  The target signals a 'data in' phase.
>2.  The initiator detects a parity error in the data, and asserts ATN.
>3.  The target notices that ATN is asserted, and signals a 'message out' phase.
>4.  The initiator sends an 'initiator detected error' message.
>5.  The target detects a parity error in the message.
>
>What's the poor target to do?  I can't find anything in the SCSI-1 spec that
>addresses this situation.  Perhaps the SCSI-2 spec does address this situation?

Well, I don't have my scsi-2 spec in front of me, but here is a segment
from a host adapter driver that gives a clue:

        /*
         * If we finish sending a message out, and we are
         * still in message out phase, then the target has
         * detected one or more parity errors in the message
         * we just sent and it is asking us to resend the
         * previous message.
         */

        if ((esp->e_intr & ESP_INT_BUS) && phase == ESP_PHASE_MSG_OUT) {
                /*
                 * As per SCSI-2 specification, if the message to
                 * be re-sent is greater than one byte, then we
                 * have to set ATN*.
                 */
                if (esp->e_omsglen > 1) {
                        ep->esp_cmd = CMD_SET_ATN;
                }
                esplog(esp, LOG_ERR,
                    "SCSI bus MESSAGE OUT phase parity error");
                sp->cmd_pkt.pkt_statistics |= STAT_PERR;
                New_state(esp, ACTS_MSG_OUT);
                return (ACTION_PHASEMANAGE);
        }

kev@hpcpbla.HP.COM (Kevin Jones) (07/09/90)

> 1. The target signals a 'data in' phase.
> 2. The initiator detects a parity error in the data, and asserts ATN.
> 3. The target notices that ATN is asserted, and signals
     a 'message out' phase.
> 4. The initiator sends an 'initiator detected error' message.'
> 5. The target detects a parity error in the message.

6. The target continues handshaking message-out bytes until the host
   dropps ATN.
7. The target asserts REQ (whilst remaining in message-out phase),
   indicating to the host it wants the previous message-out bytes to
   be re-sent.
8. The host will re-send the message-out byte(s) (It will re-assert
   ATN if there is more than one byte to send).
9. The target receives the  'initiator detected error' message.
10. The target sends a 'restore pointers' message to the host.
11. The target re-transmits the data-in.
12. The operation completes.

Message-out retry is documented in SCSI 1 and 2. Look at the
"Message Out phase" description in the "Logical Characteristics"
section (5 I think??).


-----------------------------------------------------------------
Kevin Jones.                       | Hewlett Packard Ltd,
                                   | Computer Peripherals Bristol,
kev%hpcpbla@hplb.hpl.hp.com        | Filton Road,
                                   | Stoke Gifford,
Tel: 011 44 272 799910 (ext 22351) | Bristol.   BS12 6QZ.
                                   | ENGLAND.
-----------------------------------------------------------------

This response does not represent the official position of, or
statement by, the Hewlett-Packard Company.  The above data is
provided for informational purposes only. It is supplied
without warranty of any kind.