Add extra tests to the MassStorage device demo and class driver for validating command blocks from the host.

This commit is contained in:
Dean Camera committed 2009-07-21 04:46:48 +00:00
1 parent 67f390fe74
commit d0db78432f
2 files changed
+4

No files matched your search

@@ -256,6 +256,8 @@ static bool ReadInCommandBlock(void)
/* Verify the command block - abort if invalid */
if ((CommandBlock.Signature != CBW_SIGNATURE) ||
(CommandBlock.LUN >= TOTAL_LUNS) ||
(CommandBlock.Flags & 0x1F) ||
(CommandBlock.SCSICommandLength == 0) ||
(CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH))
{
/* Stall both data pipes until reset by host */