From 023838fe4aad5b5f0da00b767afd1400d4e40b4c Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 27 Aug 2009 11:43:37 +0000 Subject: [PATCH] Add check to Pipe_IsEndpointBound() in the Mass Storage Host mode Class driver to ensure that multiple instances of the driver can be used on a single device with multiple Mass Storage interfaces. --- LUFA/Drivers/USB/Class/Host/MassStorage.c | 7 +++++-- LUFA/ManPages/FutureChanges.txt | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c index 1f66aa8630..ba281cfa48 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c @@ -113,8 +113,11 @@ static uint8_t DComp_NextInterfaceBulkDataEndpoint(void* CurrentDescriptor) uint8_t EndpointType = (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK); - if (EndpointType == EP_TYPE_BULK) - return DESCRIPTOR_SEARCH_Found; + if ((EndpointType == EP_TYPE_BULK) && + (!(Pipe_IsEndpointBound(CurrentEndpoint->EndpointAddress)))) + { + return DESCRIPTOR_SEARCH_Found; + } } else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) { diff --git a/LUFA/ManPages/FutureChanges.txt b/LUFA/ManPages/FutureChanges.txt index 639e4eee4d..ae592fde50 100644 --- a/LUFA/ManPages/FutureChanges.txt +++ b/LUFA/ManPages/FutureChanges.txt @@ -12,6 +12,7 @@ * or post your suggestion as an enhancement request to the project bug tracker. * * Targeted for This Release: + * - Simplify Mass Storage Host LowLevel SCSI demo * - Finish Host Mode Class Drivers * ( ) Audio * (C) CDC