PDP11, PDP10, VAX: Fix DMC11 device DDCMP Maintenance packet handling
1) Assure that Link line carrier is present prior to attempting to transmit maintenance packets. 2) Properly set flag bits in maintenance packets.
This commit is contained in:
parent
3b8fc9d314
commit
acbea91524
2 changed files with 4 additions and 3 deletions
|
@ -136,7 +136,7 @@ if (sim_deb && dptr && (reason & dptr->dctrl)) {
|
|||
}
|
||||
break;
|
||||
case DDCMP_DLE: /* Maintenance Message */
|
||||
sim_debug (reason, dptr, "Maintenance Message, Count: %d, Flags: %s, HDRCRC: %s, DATACRC: %s\n", (msg2 << 8)| msg[1], flag,
|
||||
sim_debug (reason, dptr, "Maintenance Message, Count: %d, Flags: %s, Addr: %d, HDRCRC: %s, DATACRC: %s\n", (msg2 << 8)|msg[1], flag, msg[5],
|
||||
(0 == ddcmp_crc16 (0, msg, DDCMP_HEADER_SIZE)) ? "OK" : "BAD", (0 == ddcmp_crc16 (0, msg+DDCMP_HEADER_SIZE, 2+((msg2 << 8)|msg[1]))) ? "OK" : "BAD");
|
||||
break;
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ static void ddcmp_build_maintenance_packet (uint8 *buf, size_t size)
|
|||
{
|
||||
buf[0] = DDCMP_DLE;
|
||||
buf[1] = size & 0xFF;
|
||||
buf[2] = ((size >> 8) & 0x3F) | (DDCMP_FLAG_SELECT|DDCMP_FLAG_QSYNC << 6);
|
||||
buf[2] = ((size >> 8) & 0x3F) | ((DDCMP_FLAG_SELECT|DDCMP_FLAG_QSYNC) << 6);
|
||||
buf[3] = 0;
|
||||
buf[4] = 0;
|
||||
buf[5] = 1;
|
||||
|
|
|
@ -871,6 +871,7 @@ DDCMP_STATETABLE DDCMP_TABLE[] = {
|
|||
{41, Run, {ddcmp_REPMessageSent}, Run, {ddcmp_StartTimer}},
|
||||
{42, Maintenance, {ddcmp_ReceiveMaintMsg}, Maintenance, {ddcmp_GiveBufferToUser}},
|
||||
{43, Maintenance, {ddcmp_UserSendMessage,
|
||||
ddcmp_LineConnected,
|
||||
ddcmp_TransmitterIdle}, Maintenance, {ddcmp_SendMaintMessage}},
|
||||
{44, All} /* End of Table */
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue