diff --git a/src/drv/drvPEPBitBus.c b/src/drv/drvPEPBitBus.c index d564530bd..fce7e3195 100644 --- a/src/drv/drvPEPBitBus.c +++ b/src/drv/drvPEPBitBus.c @@ -1086,7 +1086,27 @@ int link; if (pXvmeLink[link]->abortFlag == 0) { /* don't add to busy list if was a RAC_RESET_SLAVE */ - if ((pnode->txMsg.cmd != RAC_RESET_SLAVE) && (pnode->txMsg.tasks != 0)) + if ((pnode->txMsg.cmd == RAC_RESET_SLAVE) && (pnode->txMsg.tasks == 0)) + { + printf("xvmeTxTask(%d): RAC_RESET_SLAVE sent\n", link); + + pnode->status = BB_OK; + + if (pnode->finishProc != NULL) { + if (bbDebug>4) + printf("xvmeTxTask(%d): invoking the callbackRequest\n", + link); + callbackRequest(pnode); /* schedule completion processing */ + } + else + { + /* If there is a semaphore for synchronous I/O, unlock it */ + if (pnode->psyncSem != NULL) + semGive(*(pnode->psyncSem)); + } + taskDelay(15); + } + else { /* Lock the busy list */ semTake(plink->busyList.sem, WAIT_FOREVER); @@ -1119,26 +1139,6 @@ int link; xvmeTmoHandler, link); } } - else { - /* finish the transaction here if was a RAC_RESET_SLAVE */ - printf("xvmeTxTask(%d): RAC_RESET_SLAVE sent\n", link); - - pnode->status = BB_OK; - - if (pnode->finishProc != NULL) { - if (bbDebug>4) - printf("xvmeTxTask(%d): invoking the callbackRequest\n", - link); - callbackRequest(pnode); /* schedule completion processing */ - } - else - { - /* If there is a semaphore for synchronous I/O, unlock it */ - if (pnode->psyncSem != NULL) - semGive(*(pnode->psyncSem)); - } - taskDelay(15); - } } else { /* if abortFlag != 0 */ /* Aborted transmission operation, re-queue the message */ semTake(plink->queue[BB_Q_HIGH].sem, WAIT_FOREVER);