PDP11, PDP10, VAX: Start device connection polling on device reset when any units are attached
This commit is contained in:
parent
fc885f80dc
commit
e81de979f6
2 changed files with 19 additions and 5 deletions
|
@ -3676,6 +3676,8 @@ if (0 == dmc_units[0].flags) { /* First Time Initializations */
|
|||
ans = auto_config (dptr->name, (dptr->flags & DEV_DIS) ? 0 : dptr->numunits - 2);
|
||||
|
||||
if (!(dptr->flags & DEV_DIS)) {
|
||||
int32 attached = 0;
|
||||
|
||||
for (i = 0; i < DMC_NUMDEVICE + DMP_NUMDEVICE; i++) {
|
||||
if (dmc_ctrls[i].device == dptr) {
|
||||
BUFFER *buffer;
|
||||
|
@ -3709,11 +3711,16 @@ if (!(dptr->flags & DEV_DIS)) {
|
|||
dmc_buffer_queue_init_all(controller);
|
||||
dmc_clrinint(controller);
|
||||
dmc_clroutint(controller);
|
||||
for (j=0; j<dptr->numunits-1; j++)
|
||||
for (j=0; j<dptr->numunits-1; j++) {
|
||||
sim_cancel (&dptr->units[j]); /* stop poll */
|
||||
if (dptr->units[j].flags & UNIT_ATT)
|
||||
++attached;
|
||||
}
|
||||
dmc_process_master_clear(controller);
|
||||
}
|
||||
}
|
||||
if (attached)
|
||||
sim_activate_after (dptr->units+(dptr->numunits-2), DMC_CONNECT_POLL*1000000);/* start poll */
|
||||
}
|
||||
|
||||
return ans;
|
||||
|
@ -3747,7 +3754,7 @@ strncpy (port, cptr, CBUFSIZE-1);
|
|||
uptr->filename = (char *)malloc (strlen(port)+1);
|
||||
strcpy (uptr->filename, port);
|
||||
uptr->flags |= UNIT_ATT;
|
||||
sim_activate_after (dptr->units+mp->lines, DMC_CONNECT_POLL*1000000);/* start poll */
|
||||
sim_activate_after (dptr->units+(dptr->numunits-2), DMC_CONNECT_POLL*1000000);/* start poll */
|
||||
return ans;
|
||||
}
|
||||
|
||||
|
|
|
@ -1191,7 +1191,8 @@ return SCPE_OK;
|
|||
|
||||
static t_stat dup_reset (DEVICE *dptr)
|
||||
{
|
||||
int32 i, ndev;
|
||||
t_stat r;
|
||||
int32 i, ndev, attached = 0;
|
||||
|
||||
sim_debug(DBG_TRC, dptr, "dup_reset()\n");
|
||||
|
||||
|
@ -1216,8 +1217,11 @@ if ((!UNIBUS) && (dptr == &dup_dev)) {
|
|||
|
||||
if (dup_ldsc == NULL) { /* First time startup */
|
||||
dup_desc.ldsc = dup_ldsc = (TMLN *)calloc (dup_desc.lines, sizeof(*dup_ldsc));
|
||||
for (i = 0; i < dup_desc.lines; i++) /* init each line */
|
||||
for (i = 0; i < dup_desc.lines; i++) { /* init each line */
|
||||
dup_units[i] = dup_unit_template;
|
||||
if (dup_units[i].flags & UNIT_ATT)
|
||||
++attached;
|
||||
}
|
||||
dup_units[dup_desc.lines] = dup_poll_unit_template;
|
||||
/* Initialize to standard factory Option Jumper Settings */
|
||||
for (i = 0; i < DUP_LINES; i++) {
|
||||
|
@ -1237,7 +1241,10 @@ dup_desc.dptr = DUPDPTR; /* Connect appropriate d
|
|||
dup_desc.uptr = dup_units+dup_desc.lines; /* Identify polling unit */
|
||||
sim_cancel (dup_units+dup_desc.lines); /* stop poll */
|
||||
ndev = ((dptr->flags & DEV_DIS)? 0: dup_desc.lines );
|
||||
return auto_config (dptr->name, ndev); /* auto config */
|
||||
r = auto_config (dptr->name, ndev); /* auto config */
|
||||
if ((r == SCPE_OK) && (attached))
|
||||
sim_activate_after (dup_units+dup_desc.lines, DUP_CONNECT_POLL*1000000);/* start poll */
|
||||
return r;
|
||||
}
|
||||
|
||||
static t_stat dup_attach (UNIT *uptr, char *cptr)
|
||||
|
|
Loading…
Add table
Reference in a new issue