فهرست منبع

Fix incorrect reporting of failures from self-test function.

Michael McMaster 6 سال پیش
والد
کامیت
558835da7b
3فایلهای تغییر یافته به همراه5 افزوده شده و 74 حذف شده
  1. 3 0
      lib/SCSI2SD/CHANGELOG
  2. 1 1
      lib/SCSI2SD/src/firmware/config.c
  3. 1 73
      lib/SCSI2SD/src/firmware/scsiPhy.c

+ 3 - 0
lib/SCSI2SD/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.

+ 1 - 1
lib/SCSI2SD/src/firmware/config.c

@@ -37,7 +37,7 @@
 
 #include <string.h>
 
-static const uint16_t FIRMWARE_VERSION = 0x0627;
+static const uint16_t FIRMWARE_VERSION = 0x0628;
 
 // 1 flash row
 static const uint8_t DEFAULT_CONFIG[128] =

+ 1 - 73
lib/SCSI2SD/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;
 }