From ba711d6759c6e15e93557fe5d401cc61a31dfff6 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Fri, 9 Jul 2010 07:44:08 +0000
Subject: [PATCH] Oops - fix errors in the MassStorageKeyboard SCSI driver file
 due to incorrect copy/paste.

---
 Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
index 897090c91..e4bf4d602 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Lib/SCSI.c
@@ -307,10 +307,10 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* MSInterfaceInfo
 	uint16_t TotalBlocks;
 	
 	/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
-	BlockAddress = SwapEndian_32(*(uint32_t*)&CommandBlock.SCSICommandData[2]);
+	BlockAddress = SwapEndian_32(*(uint32_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[2]);
 
 	/* Load in the 16-bit total blocks (SCSI uses big-endian, so have to reverse the byte order) */
-	TotalBlocks  = SwapEndian_16(*(uint16_t*)&CommandBlock.SCSICommandData[7]);
+	TotalBlocks  = SwapEndian_16(*(uint16_t*)&MSInterfaceInfo->State.CommandBlock.SCSICommandData[7]);
 	
 	/* Check if the block address is outside the maximum allowable value for the LUN */
 	if (BlockAddress >= LUN_MEDIA_BLOCKS)
-- 
GitLab