diff -r a232af6b0b1f -r a5496987b1da kernel/eka/drivers/usbc/usbdma.cpp --- a/kernel/eka/drivers/usbc/usbdma.cpp Wed Jun 23 12:58:21 2010 +0100 +++ b/kernel/eka/drivers/usbc/usbdma.cpp Thu Jul 01 17:57:33 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++) {