Fix to properly report device attention when a manual detach operation is performed (from Bob Supnik)
This commit is contained in:
parent
ac8bd2521b
commit
cb659d6c83
2 changed files with 6 additions and 1 deletions
|
@ -1155,6 +1155,7 @@ return SCPE_OK;
|
|||
t_stat rp_detach (UNIT *uptr)
|
||||
{
|
||||
int32 drv;
|
||||
extern int32 sim_is_running;
|
||||
|
||||
if (!(uptr->flags & UNIT_ATT)) /* attached? */
|
||||
return SCPE_OK;
|
||||
|
@ -1167,7 +1168,8 @@ if (sim_is_active (uptr)) { /* unit active? */
|
|||
if (uptr->FUNC >= FNC_WCHK) /* data transfer? */
|
||||
rpcs1 = rpcs1 | CS1_DONE | CS1_TRE; /* set done, err */
|
||||
}
|
||||
update_rpcs (CS1_SC, drv); /* request intr */
|
||||
if (!sim_is_running) /* from console? */
|
||||
update_rpcs (CS1_SC, drv); /* request intr */
|
||||
return detach_unit (uptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -1390,11 +1390,14 @@ t_stat rp_detach (UNIT *uptr)
|
|||
{
|
||||
int32 drv;
|
||||
DEVICE *dptr = find_dev_from_unit (uptr);
|
||||
extern int32 sim_is_running;
|
||||
|
||||
if (!(uptr->flags & UNIT_ATT)) /* attached? */
|
||||
return SCPE_OK;
|
||||
drv = (int32) (uptr - dptr->units); /* get drv number */
|
||||
rpds[drv] = rpds[drv] & ~(DS_MOL | DS_RDY | DS_WRL | DS_VV | DS_OFM);
|
||||
if (!sim_is_running) /* from console? */
|
||||
rp_update_ds (DS_ATA, drv); /* request intr */
|
||||
return sim_disk_detach (uptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue