lkml.org 
[lkml]   [2010]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND/PATCH 5/6] USB: musb-gadget: complete request only if data is transfered over
Hi,

On Tue, Sep 14, 2010 at 05:46:22AM -0500, Sergei Shtylyov wrote:
> If a DMA interrupt comes when the whole transfer is not yet complete (and
>other Ming Lei's patches are making this possible), it will pass due to the

than this is the actual problem, no ? If we're using mode1 dma (as we
are on tx path), we should only get dma interrupt when the whole
transfer has been completed.

>'ís_dma' condition above the patched code:
>
> if (is_dma || request->actual == request->length) {
>
>and then it will hit the code sending the final ZLP (above this patched code too):

but this was already there before the patch.

> /*
> * First, maybe a terminating short packet. Some DMA
> * engines might handle this by themselves.
> */
> if ((request->zero && request->length
> && request->length % musb_ep->packet_sz == 0)
>#ifdef CONFIG_USB_INVENTRA_DMA
> || (is_dma && (!dma->desired_mode ||
> (request->actual &
> (musb_ep->packet_sz - 1))))
>#endif
> ) {
>
>before the transfer is complete while it should only be hit when and only when
>the whole transfer is complete. The current code doesn't look correct as well
>though, all due to this 'ís_dma' condition. Surely this needs fixing.

likewise, this was there before the patch. I don't think the real
problem lies with this patch, it's been there for a while, don't you
agree ?

the problem is not on the extra if () added below the quoted code,
it's on the quoted code itself, which wasn't changed in any way.

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-09-14 12:57    [W:0.102 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site