From: Michael McMaster Date: Wed, 30 Oct 2019 10:36:49 +0000 (+1000) Subject: Fix incorrect reporting of failures from self-test function. X-Git-Tag: v6.2.8 X-Git-Url: http://git.codesrc.com/gitweb.cgi?a=commitdiff_plain;h=fe3bb71fc00c649f4cdeef1a91c277409fcac2cf;p=SCSI2SD-V6.git Fix incorrect reporting of failures from self-test function. --- diff --git a/CHANGELOG b/CHANGELOG index a6955fff..61da61ef 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +20191030 6.2.8 + - Fix incorrect results from the self-test function. + 20191009 6.2.7 - Slight improvements to data throughput, which may assist SCSI hosts with short timeouts. diff --git a/src/firmware/config.c b/src/firmware/config.c index f9b288c8..0e147a86 100755 --- a/src/firmware/config.c +++ b/src/firmware/config.c @@ -37,7 +37,7 @@ #include -static const uint16_t FIRMWARE_VERSION = 0x0627; +static const uint16_t FIRMWARE_VERSION = 0x0628; // 1 flash row static const uint8_t DEFAULT_CONFIG[128] = diff --git a/src/firmware/scsiPhy.c b/src/firmware/scsiPhy.c index 9337b13c..a3801273 100755 --- a/src/firmware/scsiPhy.c +++ b/src/firmware/scsiPhy.c @@ -133,17 +133,6 @@ void EXTI4_IRQHandler() } } -static void assertFail() -{ - while (1) - { - s2s_ledOn(); - s2s_delay_ms(100); - s2s_ledOff(); - s2s_delay_ms(100); - } -} - void scsiSetDataCount(uint32_t count) { @@ -969,69 +958,8 @@ int scsiSelfTest() // TODO Test DBP *SCSI_CTRL_DBX = 0; - // FPGA comms test code - for(i = 0; i < 10000; ++i) - { - for (int j = 0; j < SCSI_FIFO_DEPTH; ++j) - { - scsiDev.data[j] = j; - } - - if (!scsiPhyFifoEmpty()) - { - assertFail(); - } - - *SCSI_CTRL_PHASE = DATA_IN; - HAL_DMA_Start( - &memToFSMC, - (uint32_t) &scsiDev.data[0], - (uint32_t) SCSI_FIFO_DATA, - SCSI_FIFO_DEPTH / 4); - - HAL_DMA_PollForTransfer( - &memToFSMC, - HAL_DMA_FULL_TRANSFER, - 0xffffffff); - - if (!scsiPhyFifoFull()) - { - assertFail(); - } - - memset(&scsiDev.data[0], 0, SCSI_FIFO_DEPTH); - - *SCSI_CTRL_PHASE = DATA_OUT; - HAL_DMA_Start( - &fsmcToMem, - (uint32_t) SCSI_FIFO_DATA, - (uint32_t) &scsiDev.data[0], - SCSI_FIFO_DEPTH / 2); - - HAL_DMA_PollForTransfer( - &fsmcToMem, - HAL_DMA_FULL_TRANSFER, - 0xffffffff); - - if (!scsiPhyFifoEmpty()) - { - assertFail(); - } - - - for (int j = 0; j < SCSI_FIFO_DEPTH; ++j) - { - if (scsiDev.data[j] != (uint8_t) j) - { - result |= 64; - } - } - - s2s_fpgaReset(); - - } - *SCSI_CTRL_BSY = 0; + return result; }