diff --git a/VAX/vax_xs.c b/VAX/vax_xs.c index 7b6289cb0..b601c7a85 100644 --- a/VAX/vax_xs.c +++ b/VAX/vax_xs.c @@ -130,7 +130,7 @@ DEVICE xs_dev = { 1, DEV_RDX, 20, 1, DEV_RDX, 8, NULL, NULL, &xs_reset, NULL, &xs_attach, &xs_detach, - &xs_dib, DEV_DEBUG | XS_FLAGS, 0, + &xs_dib, DEV_DEBUG | XS_FLAGS | DEV_ETHER, 0, xs_debug, NULL, NULL, &xs_help, NULL, NULL, &xs_description }; diff --git a/scp.c b/scp.c index 7acd1f194..49d677f0c 100644 --- a/scp.c +++ b/scp.c @@ -5760,6 +5760,16 @@ if (cptr && (*cptr != 0)) /* now eol? */ #ifdef SIM_ASYNCH_IO if (flag == sim_asynch_enabled) /* already set correctly? */ return SCPE_OK; +if (1) { + uint32 i; + DEVICE *dptr; + + for (i = 1; (dptr = sim_devices[i]) != NULL; i++) { /* flush attached files */ + if ((DEV_TYPE(dptr) == DEV_ETHER) && + (dptr->units->flags & UNIT_ATT)) + return sim_messagef (SCPE_ALATT, "Can't change asynch mode with %s device attached\n", dptr->name); + } + } sim_asynch_enabled = flag; tmxr_change_async (); sim_timer_change_asynch (); diff --git a/sim_ether.c b/sim_ether.c index 3d4ca071e..e1013bcbf 100644 --- a/sim_ether.c +++ b/sim_ether.c @@ -2177,6 +2177,10 @@ return NULL; } #endif +/* eth_set_async + * + * Turn on reciever processing which can be either asynchronous or polled + */ t_stat eth_set_async (ETH_DEV *dev, int latency) { #if !defined(USE_READER_THREAD) || !defined(SIM_ASYNCH_IO) @@ -2186,7 +2190,7 @@ return sim_messagef (SCPE_NOFNC, "%s", msg); #else int wakeup_needed; -dev->asynch_io = 1; +dev->asynch_io = sim_asynch_enabled; dev->asynch_io_latency = latency; pthread_mutex_lock (&dev->lock); wakeup_needed = (dev->read_queue.count != 0); @@ -2199,6 +2203,10 @@ if (wakeup_needed) { return SCPE_OK; } +/* eth_clr_async + * + * Turn off reciever processing + */ t_stat eth_clr_async (ETH_DEV *dev) { #if !defined(USE_READER_THREAD) || !defined(SIM_ASYNCH_IO)