PDP10, PDP11, VAX: Avoid returning "Line Unit" test failed after DMC/DMR master clear if a line is not attached. Let the attached state (if it needs to be determined) be reflected by sensing modem status bits.

This commit is contained in:
Mark Pizzolato 2014-05-14 00:16:14 -07:00
parent ddaf2764a7
commit 4299ee96db

View file

@ -2309,18 +2309,12 @@ while ((control = controller->control_out)) {
controller->control_out = NULL;
dmc_setreg(controller, 0, 0, DBG_RGC);
if (controller->dev_type == DMR) {
if (dmc_is_attached(controller->unit)) {
/* Indicates microdiagnostics complete */
if (((*controller->csrs->sel0 & DMC_SEL0_M_UDIAG) != 0) ^
(dmc_microdiag[controller->index]))
dmc_setreg(controller, 2, 0x8000, DBG_RGC);/* Microdiagnostics Complete */
else
dmc_setreg(controller, 2, 0x4000, DBG_RGC); /* Microdiagnostics Inhibited */
}
else {
/* Indicate M8203 (Line Unit) test failed */
dmc_setreg(controller, 2, 0x0200, DBG_RGC);
}
/* Indicates microdiagnostics complete */
if (((*controller->csrs->sel0 & DMC_SEL0_M_UDIAG) != 0) ^
(dmc_microdiag[controller->index]))
dmc_setreg(controller, 2, 0x8000, DBG_RGC);/* Microdiagnostics Complete */
else
dmc_setreg(controller, 2, 0x4000, DBG_RGC); /* Microdiagnostics Inhibited */
}
else {
/* preserve contents of BSEL3 if DMC-11 */