aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c')
-rw-r--r--Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
index f400e20e3..771773bb7 100644
--- a/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
+++ b/Demos/Device/ClassDriver/MassStorage/Lib/SCSI.c
@@ -237,8 +237,6 @@ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_Device_t* MSInterface
*/
static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
{
- uint8_t ReturnByte;
-
/* Check to see if the SELF TEST bit is not set */
if (!(MSInterfaceInfo->State.CommandBlock.SCSICommandData[1] & (1 << 2)))
{
@@ -250,14 +248,8 @@ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceI
return false;
}
- /* Test first Dataflash IC is present and responding to commands */
- Dataflash_SelectChip(DATAFLASH_CHIP1);
- Dataflash_SendByte(DF_CMD_READMANUFACTURERDEVICEINFO);
- ReturnByte = Dataflash_ReceiveByte();
- Dataflash_DeselectChip();
-
- /* If returned data is invalid, fail the command */
- if (ReturnByte != DF_MANUFACTURER_ATMEL)
+ /* Check to see if all attached Dataflash ICs are functional */
+ if (!(DataflashManager_CheckDataflashOperation()))
{
/* Update SENSE key with a hardware error condition and return command fail */
SCSI_SET_SENSE(SCSI_SENSE_KEY_HARDWARE_ERROR,
@@ -266,25 +258,6 @@ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_Device_t* MSInterfaceI
return false;
}
-
- #if (DATAFLASH_TOTALCHIPS == 2)
- /* Test second Dataflash IC is present and responding to commands */
- Dataflash_SelectChip(DATAFLASH_CHIP2);
- Dataflash_SendByte(DF_CMD_READMANUFACTURERDEVICEINFO);
- ReturnByte = Dataflash_ReceiveByte();
- Dataflash_DeselectChip();
-
- /* If returned data is invalid, fail the command */
- if (ReturnByte != DF_MANUFACTURER_ATMEL)
- {
- /* Update SENSE key with a hardware error condition and return command fail */
- SCSI_SET_SENSE(SCSI_SENSE_KEY_HARDWARE_ERROR,
- SCSI_ASENSE_NO_ADDITIONAL_INFORMATION,
- SCSI_ASENSEQ_NO_QUALIFIER);
-
- return false;
- }
- #endif
/* Succeed the command and update the bytes transferred counter */
MSInterfaceInfo->State.CommandBlock.DataTransferLength = 0;