Re: [PATCH v3 5/7] usb: musb: introduce dma_channel.packet_done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/26/2014 08:58 AM, George Cherian wrote:
> On 5/25/2014 2:06 PM, Daniel Mack wrote:
>> The musb/cppi41 glue layer is capable of handling transactions that span
>> over more than one USB packet by reloading the DMA descriptors
>> partially. An urb is considered completed when either its transfer
>> buffer has been filled entirely (actual_length ==
>> transfer_buffer_length) or if a packet in the stream has less bytes than
>> the endpoint's wMaxPacketSize.
>>
>> Once one of the above conditions is met, musb_dma_completion() is called
>> from cppi41_trans_done(). However, the final decision whether or not to
>> return the urb to its owner is made by the core and its determination of
>> the variable 'done' in musb_host_rx(). This code has currently no way of
>> knowing what the size of the last packet was, and whether or not to
>> give back the urb due to a short read.
>>
>> Fix this by introducing a new boolean flag in 'struct dma_channel', and
>> set it from musb_cppi41.c. If set, it will make the core do what the
>> DMA layer decided and complete the urb.
>>
>> Signed-off-by: Daniel Mack <zonque@xxxxxxxxx>
> Since this is used only for rx, Can you name newly added  dma flag as 
> rx_packet_done?

Good idea. Will be part of v4, along with Sergei's s/CSR0/TXCSR/.


Thanks,
Daniel

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux