aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.c8
-rw-r--r--LUFA/ManPages/ChangeLog.txt1
2 files changed, 6 insertions, 3 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c
index ba281cfa4..65c49b15c 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c
@@ -110,8 +110,10 @@ static uint8_t DComp_NextInterfaceBulkDataEndpoint(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
{
- uint8_t EndpointType = (DESCRIPTOR_CAST(CurrentDescriptor,
- USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK);
+ USB_Descriptor_Endpoint_t* CurrentEndpoint = DESCRIPTOR_PCAST(CurrentDescriptor,
+ USB_Descriptor_Endpoint_t);
+
+ uint8_t EndpointType = (CurrentEndpoint->Attributes & EP_TYPE_MASK);
if ((EndpointType == EP_TYPE_BULK) &&
(!(Pipe_IsEndpointBound(CurrentEndpoint->EndpointAddress))))
@@ -137,7 +139,7 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* MSInterfaceInfo, MS_
{
uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
- SCSICommandBlock->Tag = MSInterfaceInfo->State.TransactionTag++;
+ SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag;
if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF)
MSInterfaceInfo->State.TransactionTag = 1;
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 261ca4eef..13cf672ca 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -28,6 +28,7 @@
* - Added non-null function parameter pointer restrictions to USB Class drivers to improve user code reliability
* - Added new "Common" section to the class drivers, to hold all mode-independant definitions for clarity
* - Moved SCSI command/sense constants into the Mass Storage Class driver, instead of the user-code
+ * - Altered the SCSI commands in the LowLevel Mass Storage Host to save on FLASH space by reducing function calls
*
* <b>Fixed:</b>
* - Fixed possible lockup in the CDC device class driver, when the host sends data that is a multiple of the