From 30342544ad67929aff6db093a17797f3890b67de Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Wed, 2 Feb 2022 20:09:36 -0500 Subject: [PATCH] IBM360: Fixed OS/VS1 build issue. --- IBM360/ibm360_chan.c | 3 +++ IBM360/ibm360_con.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/IBM360/ibm360_chan.c b/IBM360/ibm360_chan.c index 447cdca..71a73d7 100644 --- a/IBM360/ibm360_chan.c +++ b/IBM360/ibm360_chan.c @@ -473,6 +473,7 @@ start_cmd: return 1; chan->chan_status &= 0xff; chan->chan_status |= dibp->start_cmd(uptr, chan->ccw_cmd) << 8; + /* If device is busy, check if last was CC, then mark pending */ if (chan->chan_status & STATUS_BUSY) { sim_debug(DEBUG_DETAIL, &cpu_dev, "Channel %03x busy %d\n", chan->daddr, cc); @@ -482,6 +483,7 @@ start_cmd: return 0; } + /* Check if any errors from initial command */ if (chan->chan_status & (STATUS_ATTN|STATUS_CHECK|STATUS_EXPT)) { sim_debug(DEBUG_DETAIL, &cpu_dev, "Channel %03x abort %04x\n", chan->daddr, chan->chan_status); @@ -491,6 +493,7 @@ start_cmd: irq_pend = 1; return 1; } + /* Check if immediate channel end */ if (chan->chan_status & STATUS_CEND) { chan->ccw_cmd = 0; diff --git a/IBM360/ibm360_con.c b/IBM360/ibm360_con.c index 7e7cf1c..c83c3f4 100644 --- a/IBM360/ibm360_con.c +++ b/IBM360/ibm360_con.c @@ -139,7 +139,7 @@ uint8 con_startcmd(UNIT *uptr, uint8 cmd) { sim_debug(DEBUG_CMD, &con_dev, "%d: Cmd RD\n", u); if (uptr->CMD & CON_REQ) { uptr->CMD &= ~CON_REQ; - return SNS_ATTN|SNS_BSY; + return SNS_ATTN; } if ((uptr->CMD & CON_INPUT) == 0 && @@ -162,7 +162,7 @@ uint8 con_startcmd(UNIT *uptr, uint8 cmd) { sim_debug(DEBUG_CMD, &con_dev, "%d: Cmd WR\n", u); if (uptr->CMD & CON_REQ) { uptr->CMD &= ~CON_REQ; - return SNS_ATTN|SNS_BSY; + return SNS_ATTN; } uptr->CMD |= cmd & CON_MSK; uptr->SNS = 0; @@ -178,7 +178,7 @@ uint8 con_startcmd(UNIT *uptr, uint8 cmd) { sim_debug(DEBUG_CMD, &con_dev, "%d: Cmd NOP\n", u); if (uptr->CMD & CON_REQ) { uptr->CMD &= ~CON_REQ; - return SNS_ATTN|SNS_BSY; + return SNS_ATTN; } uptr->SNS = 0; return SNS_CHNEND|SNS_DEVEND;