1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-02-09 09:42:30 +00:00

Don't read another until this one is read

Instead of accepting new input pkts after checking that the input pkt is shaped OK, do it after actually reading the pkt to ITS. Otherwise read pkts can be overwritten while only partially read to ITS, leading to corruption of data.
This commit is contained in:
Björn Victor
2021-02-22 07:34:37 +01:00
parent 4af56464aa
commit efb657a55b

View File

@@ -838,6 +838,8 @@ ch11_read(struct device *d, register uint18 addr)
fprintf(DVDBF(ch), "[CH11 reading last word, clearing RDN]\r\n");
ch->ch_rcnt = -1; /* read last word */
REG(ch) &= ~CH_RDN; /* Done receiving? */
ch->ch_inactf = TRUE; /* OK to read another */
dp_xrdone(dp_dpxfr(&ch->ch_dp)); /* Done, can now ACK */
}
break;
}
@@ -1548,8 +1550,6 @@ chaos_inxfer(register struct ch11 *ch)
}
REG(ch) |= CH_RDN; /* Note it's done! */
}
ch->ch_inactf = TRUE; /* OK to read another */
dp_xrdone(dpx); /* Done, can now ACK */
}
#endif /* KLH10_DEV_CH11 */