diff -r 5e441a173c63 -r d9f1e5bfe28c kernel/eka/drivers/usbc/usbdma.cpp --- a/kernel/eka/drivers/usbc/usbdma.cpp Mon May 24 18:45:46 2010 +0100 +++ b/kernel/eka/drivers/usbc/usbdma.cpp Thu Jun 10 11:48:01 2010 +0100 @@ -619,7 +619,14 @@ { if (iEndpointType == KUsbEpTypeBulk) { - isShortPacket = (size < iMaxPacketSize) || (size & maxPacketSizeMask); + if(iExtractOffset & maxPacketSizeMask) + { + isShortPacket = ((size+iExtractOffset) < iMaxPacketSize) || ((size+iExtractOffset) & maxPacketSizeMask); + } + else + { + isShortPacket = (size < iMaxPacketSize) || (size & maxPacketSizeMask); + } } else { @@ -830,17 +837,7 @@ if (iEndpointType == KUsbEpTypeBulk) { const TInt mask = iMaxPacketSize - 1; - if (iTotalRxBytesAvail & mask) - return ETrue; - // residue==0; this can be because - // zlps exist, or short packets combine to n * max_packet_size - // This means spadework - const TInt s = iCurrentPacketSizeArray[iCurrentPacket] - iExtractOffset; - if ((s == 0) || (s & mask)) - { - return ETrue; - } for (TInt i = 0; i < iNumberofBuffers; i++) {