From 4db7958bee83cfe52f35d3c7a97d45fbb828df15 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Wed, 6 Jul 2022 21:52:42 -0400 Subject: [PATCH] IBM360: Fixed issue with TIO on busy device. --- IBM360/ibm360_chan.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/IBM360/ibm360_chan.c b/IBM360/ibm360_chan.c index 71a73d7..ce5d093 100644 --- a/IBM360/ibm360_chan.c +++ b/IBM360/ibm360_chan.c @@ -55,7 +55,7 @@ #define STATUS_CHECK 0x0200 /* Unit check */ #define STATUS_EXPT 0x0100 /* Unit excpetion */ #define STATUS_PCI 0x0080 /* Program interupt */ -#define STATUS_LENGTH 0x0040 /* Incorrect lenght */ +#define STATUS_LENGTH 0x0040 /* Incorrect length */ #define STATUS_PCHK 0x0020 /* Program check */ #define STATUS_PROT 0x0010 /* Protection check */ #define STATUS_CDATA 0x0008 /* Channel data check */ @@ -1027,6 +1027,12 @@ int testio(uint16 addr) { return 1; } + if (status & STATUS_BUSY) { /* Device busy */ + sim_debug(DEBUG_CMD, &cpu_dev, "TIO %03x %03x %02x %x %x cc=2\n", addr, + chan->daddr, chan->ccw_cmd, chan->ccw_flags, status); + return 2; + } + /* Everything ok, return cc=0 */ sim_debug(DEBUG_CMD, &cpu_dev, "TIO %03x %03x %02x %x cc=0\n", addr, chan->daddr, chan->ccw_cmd, chan->ccw_flags);